1use thiserror::Error;
2
3#[derive(Error, Debug, Clone)]
4pub enum PlayHandError {
5 #[error("Played hand contains more than 5 cards")]
6 TooManyCards,
7 #[error("Played hand contains no cards")]
8 NoCards,
9 #[error("Played hand could not determine best hand")]
10 UnknownHand,
11}
12
13#[derive(Error, Debug, Clone)]
14pub enum GameError {
15 #[error("No remaining discards")]
16 NoRemainingDiscards,
17 #[error("No remaining plays")]
18 NoRemainingPlays,
19 #[error("Invalid hand played")]
20 InvalidHand(#[from] PlayHandError),
21 #[error("Invalid stage")]
22 InvalidStage,
23}