diff --git a/namerena-runner/src/main.rs b/namerena-runner/src/main.rs index 723dc43..d8b61cd 100644 --- a/namerena-runner/src/main.rs +++ b/namerena-runner/src/main.rs @@ -1,5 +1,6 @@ -mod engine; /// 万里长征, 始于足下 +mod player; +mod engine; mod name; mod rc4; diff --git a/namerena-runner/src/player.rs b/namerena-runner/src/player.rs new file mode 100644 index 0000000..0e3b714 --- /dev/null +++ b/namerena-runner/src/player.rs @@ -0,0 +1,25 @@ + +pub struct Player { + pub team: String, + pub name: String, + pub weapon: String, + pub player_type: PlayerType, +} + +#[derive(Default)] +pub enum PlayerType { + #[default] + Normal, + Seed +} + +impl Player { + pub fn new(team: String, name: String, weapon: String, player_type: Option) -> Self { + Player { + team, + name, + weapon, + player_type: player_type.unwrap_or_default(), + } + } +}