示例#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;
     }
 }