Beispiel #1
0
 internal void addToGrid(int x, int y, Player.EnumColor color, Piece.PieceType pieceType)
 {
     if (Grid[y, x] == null)
     {
         Grid[y, x] = PieceInfoToByte(color, pieceType);
     }
 }
Beispiel #2
0
 internal Player getPlayerFromColor(Player.EnumColor color)
 {
     if (One.Color == color)
     {
         return(One);
     }
     else
     {
         return(Two);
     }
 }
Beispiel #3
0
 private byte PieceInfoToByte(Player.EnumColor color, Piece.PieceType pieceType) => byte.Parse($"{(int)color}{(int)pieceType}");