use std::fmt::{Debug, Display, Formatter, Result};
use crate::{Card, Position};
#[derive(Clone, Eq, PartialEq, Hash)]
pub struct Move {
pub card: Card,
pub from: Position,
pub to: Position,
}
impl Display for Move {
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "Move the {} from {} to {}", self.card, self.from, self.to)
}
}
impl Debug for Move {
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "Move {:?} from {} to {}", self.card, self.from, self.to)
}
}