示例#1
0
 public void UndoStone()
 {
     if (PlaysX.Count > 0)
     {
         var lastCoordinateX = PlaysX.Last();
         var lastCoordinateY = PlaysY.Last();
         CurrentBoard[lastCoordinateY][lastCoordinateX] = EmptyBoard[lastCoordinateY][lastCoordinateX];
         PlaysX.RemoveAt(PlaysX.Count - 1);
         PlaysY.RemoveAt(PlaysY.Count - 1);
     }
 }
示例#2
0
 public Boolean PlaceStone(Int32 x, Int32 y)
 {
     if (CurrentBoard[y][x] != 'w' && CurrentBoard[y][x] != 'b')
     {
         CurrentBoard[y][x] = CurrentTurn();
         PlaysX.Add(x);
         PlaysY.Add(y);
         return(true);
     }
     return(false);
 }