コード例 #1
0
ファイル: Board.cs プロジェクト: khan1000/LightGame
 private void FlipAdjacentCells(int row, int col)
 {
     if (CheckBounds(row + 1, col))
     {
         CellFlipped.Raise(this, new CellEventArgs(row + 1, col));
     }
     if (CheckBounds(row - 1, col))
     {
         CellFlipped.Raise(this, new CellEventArgs(row - 1, col));
     }
     if (CheckBounds(row, col + 1))
     {
         CellFlipped.Raise(this, new CellEventArgs(row, col + 1));
     }
     if (CheckBounds(row, col - 1))
     {
         CellFlipped.Raise(this, new CellEventArgs(row, col - 1));
     }
 }
コード例 #2
0
ファイル: Board.cs プロジェクト: khan1000/LightGame
 public void FlipCell(int row, int col)
 {
     CellFlipped.Raise(this, new CellEventArgs(row, col));
     FlipAdjacentCells(row, col);
 }