コード例 #1
0
ファイル: Game.cs プロジェクト: kkawaguchi/osero
 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
ファイル: CellPoint.cs プロジェクト: kkawaguchi/osero
 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
ファイル: Cell.cs プロジェクト: kkawaguchi/osero
 public Cell(CellPoint point,Board board)
 {
     this.Point = point;
     this.Stone = null;
     this.Board = board;
 }
コード例 #5
0
ファイル: Cell.cs プロジェクト: kkawaguchi/osero
 public Cell(CellPoint point, Board board)
 {
     this.Point = point;
     this.Stone = null;
     this.Board = board;
 }
コード例 #6
0
ファイル: Board.cs プロジェクト: kkawaguchi/osero
        public Cell GetCell(CellPoint point)
        {
            var cell = this.cells.Where(c => c.Point.Equals(point));

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