Пример #1
0
 public bool PutStone(CellPoint point,StoneColor color)
 {
     if (rule.CanPutStoneToCell(new Stone(color), this.Board.GetCell(point)))
     {
         rule.PutStoneToCell(new Stone(color), this.Board.GetCell(point));
         MoveToNextPalyer();
         return true;
     }
     return false;
 }
Пример #2
0
 public bool PutStone(CellPoint point, StoneColor color)
 {
     if (rule.CanPutStoneToCell(new Stone(color), this.Board.GetCell(point)))
     {
         rule.PutStoneToCell(new Stone(color), this.Board.GetCell(point));
         MoveToNextPalyer();
         return(true);
     }
     return(false);
 }
Пример #3
0
 public override bool Equals(object obj)
 {
     if (obj == null || this.GetType() != obj.GetType())
     {
         return(false);
     }
     else
     {
         CellPoint p = (CellPoint)obj;
         return(this.X == p.X && this.Y == p.Y);
     }
 }
Пример #4
0
 public Cell(CellPoint point,Board board)
 {
     this.Point = point;
     this.Stone = null;
     this.Board = board;
 }
Пример #5
0
 public Cell(CellPoint point, Board board)
 {
     this.Point = point;
     this.Stone = null;
     this.Board = board;
 }
Пример #6
0
        public Cell GetCell(CellPoint point)
        {
            var cell = this.cells.Where(c => c.Point.Equals(point));

            return(cell.First <Cell>());
        }