summaryrefslogtreecommitdiff
path: root/src/playerid.rs
blob: aeaf8142c9b4d99d6a6abd9502695d07b04a92ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

#[derive(Debug, Default, PartialEq, Eq, Clone, Hash)]
pub struct PlayerId {
	pub name: String
}

impl PlayerId {
	pub fn from_str(name: &str) -> Self {
		Self {name: name.to_string()}
	}
	pub fn to_string(&self) -> String {
		self.name.clone()
	}
}