@@ 13,6 13,7 @@ pub fn action_to_log(
game_status: &GameStatus,
) -> LogEntry {
let invoker_name = &game_status.players.get(&action.invoker).unwrap().display_name;
+ let target_name = &game_status.players.get(&action.target).unwrap().display_name;
match &action.command {
Command::InitSupplyPile { card, amount } => {
@@ 56,6 57,32 @@ pub fn action_to_log(
LogSection::bold(card_name),
])
}
+ Command::EndTurn {} => {
+ LogEntry::from_sections(vec![
+ LogSection::bold(invoker_name),
+ LogSection::normal(" ended their turn"),
+ ])
+ }
+ Command::StartTurn {} => {
+ LogEntry::from_sections(vec![
+ LogSection::bold(target_name),
+ LogSection::normal(" started their turn"),
+ ])
+ }
+ Command::ChangePlayerState { state } => {
+ LogEntry::from_sections(vec![
+ LogSection::bold(invoker_name),
+ LogSection::normal(" changed state to "),
+ LogSection::bold(&format!("{:?}", state)),
+ ])
+ }
+ Command::RollForCurrency { min: _, max: _ } => {
+ LogEntry::from_sections(vec![
+ LogSection::bold(invoker_name),
+ LogSection::normal(" rolled for currency (log borked)"),
+ ])
+ }
+ #[allow(unreachable_patterns)]
_ => {
LogEntry {
sections: vec![