Пример #1
0
 public int[] piecesCount()
 {
     int[] countPieces = { 0, 0 };
     for (int row = 1; row < 9; row++)
     {
         for (int element = 1; element < 9; element++)
         {
             Tile tile = rows[row][element];
             if (tile.getSide().getFace() == " X")
             {
                 countPieces[0]++;
             }
             else if (tile.getSide().getFace() == " O")
             {
                 countPieces[1]++;
             }
         }
     }
     return(countPieces);
 }
Пример #2
0
 public void render()
 {
     for (int row = 1; row < 9; row++)
     {
         for (int element = 1; element < 9; element++)
         {
             Tile tile = rows[row][element];
             if (tile.getSide().compare(currentTurn))
             {
                 Piece thingy = (Piece)tile;
                 //System.out.println("home"+thingy.getX()+" "+thingy.getY());
                 thingy.warnNeighbors();
                 Console.WriteLine("");
             }
         }
     }
 }