public Piece GetPiece(BoardGames.Players player) { switch (player) { case BoardGames.Players.One: return(piece1); case BoardGames.Players.Two: return(piece2); default: throw new NotImplementedException(player.ToString()); } }
public static BoardGames.Players Switched(this BoardGames.Players p) { switch (p) { case BoardGames.Players.One: return(BoardGames.Players.Two); case BoardGames.Players.Two: return(BoardGames.Players.One); default: throw new System.NotImplementedException(p.ToString()); } }