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; }
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); }
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); } }
public Cell(CellPoint point,Board board) { this.Point = point; this.Stone = null; this.Board = board; }
public Cell(CellPoint point, Board board) { this.Point = point; this.Stone = null; this.Board = board; }
public Cell GetCell(CellPoint point) { var cell = this.cells.Where(c => c.Point.Equals(point)); return(cell.First <Cell>()); }