/// <summary>
      /// Construct a board presenter that will manage the given board view
      /// </summary>
      /// <param name="view">The board view</param>
      public BoardPresenter(IBoardView view)
      {
         this.view = view;
         this.board = new Checkerboard();
         this.boardRules = new CheckersRules();
         this.turn = blackPlayerInfo;

         boardRules.ResetBoard(board);
         view.SetBoardState(board.Copy());
      }
Beispiel #2
0
        public Player(IMove move, IPosition startPosition,
                      int lives, IBoardRules boardRules, IGameRules playerReaction)
        {
            this.move = move;

            numberOfLives       = lives;
            this.boardRules     = boardRules;
            this.playerReaction = playerReaction;
            currentPosition     = startPosition;
        }
Beispiel #3
0
 public void Setup()
 {
     _board   = new Simple5x5Board(Appconstant.DefaultBoardSize);
     _roboman = new Roboman(_board);
 }
Beispiel #4
0
 /// <summary>
 /// Park logic into the constructor
 /// </summary>
 /// <param name="tableSize"></param>
 public Roboman(IBoardRules board)
 {
     _board = board;
 }