public static Dictionary <Int32, CVirtualPiece> GetPiecesStartKit(ESideColor color)
 {
     return(color switch
     {
         ESideColor.White => GetWhitePiecesStartKit(),
         ESideColor.Black => GetBlackPiecesStartKit(),
         _ => throw new InvalidEnumArgumentException($"Unknown kit color: {color}")
     });
Пример #2
0
 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}")
     });
Пример #3
0
 private Guid GetPlayerId(ESideColor sideColor)
 {
     return(sideColor switch
     {
         ESideColor.White => WhitePlayer.PlayerId,
         ESideColor.Black => BlackPlayer.PlayerId,
         _ => throw new Exception($"Unknown color: {sideColor}")
     });