show a different error message when taking an invalid action while choosing to put...
authorGeoffrey Allott <geoffrey@allott.email>
Wed, 7 Jun 2023 22:41:56 +0000 (23:41 +0100)
committerGeoffrey Allott <geoffrey@allott.email>
Wed, 7 Jun 2023 22:41:56 +0000 (23:41 +0100)
src/game/cribbage/mod.rs

index 7afbbcdc5957685a35c3aa482c0b5236b8c10b9b..ad51a7e0037371076c6e047dba0bc09b4f06d106 100644 (file)
@@ -237,6 +237,7 @@ impl Game for Cribbage {
                     Ok(ValidatedUserAction(UserAction { timestamp, username, action: Action::Pass }))
                 }
             }
+            (State::Choosing, _) => Err(ActionError::Dealing),
             (State::TurnUp, _) => Err(ActionError::Dealing),
             (State::ScoringTurnUp, _) => Err(ActionError::Dealing),
             (State::Scoring, _) => Err(ActionError::Dealing),