예제 #1
0
파일: Line.cs 프로젝트: ailon/tictactoe3d
 public WinningLine(Cell cell1, Cell cell2, Cell cell3)
 {
     Cell1 = cell1;
     Cell2 = cell2;
     Cell3 = cell3;
 }
예제 #2
0
파일: Game.cs 프로젝트: ailon/tictactoe3d
 static int CheckCells(Cell cell1, Cell cell2, Cell cell3)
 {
     if (Cells[cell1.Plane, cell1.Column, cell1.Row] == Cells[cell2.Plane, cell2.Column, cell2.Row]
         && Cells[cell1.Plane, cell1.Column, cell1.Row] == Cells[cell3.Plane, cell3.Column, cell3.Row])
     {
         AddNewCompletedLine(Cells[cell1.Plane, cell1.Column, cell1.Row], new WinningLine(cell1, cell2, cell3));
         return 1;
     }
     else
     {
         return 0;
     }
 }