public static Dictionary <Int32, CVirtualPiece> GetPiecesStartKit(ESideColor color) { return(color switch { ESideColor.White => GetWhitePiecesStartKit(), ESideColor.Black => GetBlackPiecesStartKit(), _ => throw new InvalidEnumArgumentException($"Unknown kit color: {color}") });
private Double GetPawnToQueenTransformationBorder(ESideColor color) { return(color switch { ESideColor.White => 0, // Pawn to queen transformation border for white side ESideColor.Black => CVirtualPiece.PieceSize * 7, // Pawn to queen transformation border for black side _ => throw new InvalidEnumArgumentException($"Unknown kit color: {color}") });
private Guid GetPlayerId(ESideColor sideColor) { return(sideColor switch { ESideColor.White => WhitePlayer.PlayerId, ESideColor.Black => BlackPlayer.PlayerId, _ => throw new Exception($"Unknown color: {sideColor}") });