From 36c16aa8c780e3ff9e2e08b7c98891fab59692c7 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Thu, 15 Sep 2022 21:59:03 +0200 Subject: log bad commands --- planetwars-rules/src/protocol.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'planetwars-rules/src/protocol.rs') diff --git a/planetwars-rules/src/protocol.rs b/planetwars-rules/src/protocol.rs index 23612d0..d93d088 100644 --- a/planetwars-rules/src/protocol.rs +++ b/planetwars-rules/src/protocol.rs @@ -49,31 +49,3 @@ pub enum CommandError { OriginDoesNotExist, DestinationDoesNotExist, } - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct PlayerCommand { - pub command: Command, - #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] -#[serde(tag = "type", content = "value")] -pub enum PlayerAction { - Timeout, - ParseError(String), - Commands(Vec), -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] -#[serde(tag = "type", content = "content")] -pub enum ServerMessage { - /// Game state in current turn - GameState(State), - /// The action that was performed - PlayerAction(PlayerAction), - /// The game is over, and this is the concluding state. - FinalState(State), -} -- cgit v1.2.3