コード例 #1
0
        public Board(IBoardCells boardCells, IBoardWinningRules boardWinningRules, IBoardRenderer boardRenderer)
        {
            _boardCells = boardCells;
            _boardRenderer = boardRenderer;
            _boardWinningRules = boardWinningRules;

            _random = new Random(DateTime.Now.Millisecond); //seed is current time's milliseconds, which is a simple way to get a random number
            _boardSize = _boardCells.Size();
        }
コード例 #2
0
        public Board(IBoardCells boardCells, IBoardWinningRules boardWinningRules, IBoardRenderer boardRenderer)
        {
            _boardCells        = boardCells;
            _boardRenderer     = boardRenderer;
            _boardWinningRules = boardWinningRules;

            _random    = new Random(DateTime.Now.Millisecond); //seed is current time's milliseconds, which is a simple way to get a random number
            _boardSize = _boardCells.Size();
        }
コード例 #3
0
 public void SetUp()
 {
     _boardWinningRules = new BoardWinningRules();
 }
コード例 #4
0
 public void SetUp()
 {
     _boardWinningRules = new BoardWinningRules();
 }