self.state = State::Completed;
Ok(())
}
- (State::CutForCall, Action::RevealCard { card }) => {
+ (State::CutForCall, Action::CutCard { card }) => {
self.deck.remove(&card);
self.hands.entry(username).or_default().insert(card);
if self.hands.values().map(HashSet::len).sum::<usize>() == self.winners.len() {
State::CutForCall => {
if let Some(username) = self.receiver {
if let Some(card) = rng.choose_from(&self.deck).cloned() {
- DealerAction::TakeAction(ValidatedUserAction(UserAction { timestamp, username, action: Action::RevealCard { card } }))
+ DealerAction::TakeAction(ValidatedUserAction(UserAction { timestamp, username, action: Action::CutCard { card } }))
} else {
error!("Expected to cut for call but there were no cards left in the deck");
DealerAction::Leave
{"timestamp":0,"username":"kat","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Clubs"}}},
{"timestamp":0,"username":"geoff","action":{"action":"PlayCard","card":{"rank":"Five","suit":"Clubs"}}},
{"timestamp":0,"username":"kat","action":{"action":"WinTrick"}},
- {"timestamp":0,"username":"geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}},
- {"timestamp":0,"username":"kat","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}},
+ {"timestamp":0,"username":"geoff","action":{"action":"CutCard","card":{"rank":"Three","suit":"Diamonds"}}},
+ {"timestamp":0,"username":"kat","action":{"action":"CutCard","card":{"rank":"Ten","suit":"Clubs"}}},
{"timestamp":0,"username":"kat","action":{"action":"WinCall"}},
{"timestamp":0,"username":"geoff","action":{"action":"NextToDeal"}},
{"timestamp":0,"username":"kat","action":{"action":"ReceiveCard","card":{"rank":"King","suit":"Spades"}}},
{"timestamp":1615925234913,"username":"geoff","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Diamonds"}}},
{"timestamp":1615925235946,"username":"kat","action":{"action":"PlayCard","card":{"rank":"Jack","suit":"Spades"}}},
{"timestamp":1615925235949,"username":"geoff","action":{"action":"WinTrick"}},
- {"timestamp":1615925235951,"username":"geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Diamonds"}}},
- {"timestamp":1615925235953,"username":"kat","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}},
+ {"timestamp":1615925235951,"username":"geoff","action":{"action":"CutCard","card":{"rank":"Jack","suit":"Diamonds"}}},
+ {"timestamp":1615925235953,"username":"kat","action":{"action":"CutCard","card":{"rank":"Six","suit":"Diamonds"}}},
{"timestamp":1615925235955,"username":"geoff","action":{"action":"WinCall"}},
{"timestamp":1615925235956,"username":"geoff","action":{"action":"NextToDeal"}},
{"timestamp":1615925235958,"username":"kat","action":{"action":"ReceiveCard","card":{"rank":"Jack","suit":"Diamonds"}}},
{"timestamp":1615925273054,"username":"geoff","action":{"action":"PlayCard","card":{"rank":"King","suit":"Diamonds"}}},
{"timestamp":1615925273976,"username":"kat","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Clubs"}}},
{"timestamp":1615925273979,"username":"kat","action":{"action":"WinTrick"}},
- {"timestamp":1615925273980,"username":"geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}},
- {"timestamp":1615925273983,"username":"kat","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}},
+ {"timestamp":1615925273980,"username":"geoff","action":{"action":"CutCard","card":{"rank":"Queen","suit":"Spades"}}},
+ {"timestamp":1615925273983,"username":"kat","action":{"action":"CutCard","card":{"rank":"Eight","suit":"Hearts"}}},
{"timestamp":1615925273984,"username":"geoff","action":{"action":"WinCall"}},
{"timestamp":1615925273986,"username":"geoff","action":{"action":"NextToDeal"}},
{"timestamp":1615925273987,"username":"kat","action":{"action":"ReceiveCard","card":{"rank":"Six","suit":"Spades"}}},