use std::collections::HashSet;
use crate::game::{Action, ActionError, DealerAction};
-use crate::username::{Username, DEALER};
+use crate::username::Username;
use crate::util::timestamp::Timestamp;
use super::ValidatedUserAction;
}
}
- fn next_dealer_action(&self, timestamp: Timestamp) -> DealerAction {
- match self.messages.len() {
- n if n % 10 == 0 => DealerAction::TakeAction(ValidatedUserAction(UserAction {
- timestamp,
- username: DEALER,
- action: Action::Message { message: format!("{} messages posted so far", n) },
- })),
- _ => DealerAction::WaitForPlayer,
- }
+ fn next_dealer_action(&self, _: Timestamp) -> DealerAction {
+ DealerAction::Leave
}
}
}
}
-pub const DEALER: Username =
- Username { username: [b'd', b'e', b'a', b'l', b'e', b'r', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] };
-
impl Display for Username {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self.as_str() {