use crate::game::Cell;
use crate::game::Player;
use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Placement {
pub player: Player,
pub cell: Cell,
}
impl Placement {
pub const fn new(player: Player, cell: Cell) -> Self {
Self { player, cell }
}
}
impl fmt::Display for Placement {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(formatter, "{} at {}", self.player, self.cell)
}
}