public void CreateFields_ThenReturnsFieldsWithValues()
        {
            BoardBuilder testee         = new BoardBuilder();
            var          expectedValues = testee.BoardFieldValues;
            var          fourPlayers    = this.CreateFourPlayers();

            var board  = testee.CreateBoard(fourPlayers);
            var result = this.To2DArray(board.Fields);

            result.Should().BeEquivalentTo(expectedValues);
        }
        public void CreateFields_ThenColorizePlayerFields(int playerIndex, int row, int column)
        {
            BoardBuilder testee = new BoardBuilder();

            Player[] players       = this.CreateFourPlayers();
            Color    expectedColor = players[playerIndex].Color;

            var board  = testee.CreateBoard(players);
            var result = board.Fields[row][column].FieldColor.ToString();

            result.Should().Be(expectedColor.ToString());
        }
        public void CreateFields_ThenAddAdvocateTokensForEveryPlayer(int playerIndex, int row, int column)
        {
            BoardBuilder testee = new BoardBuilder();

            Player[] players        = this.CreateFourPlayers();
            Player   expectedPlayer = players[playerIndex];

            var board  = testee.CreateBoard(players);
            var result = board.Fields[row][column].Token;

            result.Type.Should().Be(TokenType.Advocate);
            result.Player.Should().Be(expectedPlayer);
        }
        public ScoreCalculatorTest()
        {
            this.testee = new ScoreCalculator();
            BoardBuilder builder = new BoardBuilder();

            this.players = Enumerable.Range(0, 4).Select(x => new Player(Colors.Cyan)).ToList();
            this.board   = builder.CreateBoard(this.players);

            this.board.Fields[0][2].Token = new Token(TokenType.Paragraph, this.players[0]);
            this.board.Fields[2][2].Token = new Token(TokenType.Paragraph, this.players[0]);
            this.board.Fields[3][3].Token = new Token(TokenType.Paragraph, this.players[0]);

            this.board.Fields[1][1].Token = new Token(TokenType.Paragraph, this.players[1]);
            this.board.Fields[2][1].Token = new Token(TokenType.Paragraph, this.players[1]);
            this.board.Fields[3][1].Token = new Token(TokenType.Paragraph, this.players[1]);
        }