#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Pid { Player1, Player2, } impl std::ops::Not for Pid { type Output = Pid; fn not(self) -> Self::Output { match self { Pid::Player1 => Pid::Player2, Pid::Player2 => Pid::Player1, } } }