Ejemplo n.º 1
0
    public void CalculatesNextEmpty()
    {
        var initial = new InitialHiveBuilder();

        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬢ ⬢ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬢ ⬢ ★ ⬢ ⬢ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬢ ⬢ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";

        var expected = new ExpectedMovementBuilder();

        expected += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ✔ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ✔ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬢ ⬢ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ✔ ⬢ ⬢ ★ ⬢ ⬢ ✔ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬢ ⬢ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ✔ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ✔ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";

        var move = new OnlyJumpStraightOver();

        move.Should().HaveMoves(initial, expected);
    }
Ejemplo n.º 2
0
    public void DoesntIncludeAdjacent()
    {
        var initial = new InitialHiveBuilder();

        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬢ ⬡ ★ ⬡ ⬢ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";

        var expected = new ExpectedMovementBuilder();

        expected += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬢ ⬡ ★ ⬡ ⬢ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬢ ⬡ ⬡ ⬡ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ";

        var move = new OnlyJumpStraightOver();

        move.Should().HaveMoves(initial, expected);
    }
Ejemplo n.º 3
0
    public void CreatesCellIfTheBoardIsNotLargeEnough()
    {
        var initial = new InitialHiveBuilder();

        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        initial += " ⬡ ⬡ ⬡ ★ ⬢ ⬢ ";
        initial += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";

        var expected = new ExpectedMovementBuilder();

        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";
        expected += " ⬡ ⬡ ⬡ ★ ⬢ ⬢ ✔ ";
        expected += "⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡ ⬡";

        var move = new OnlyJumpStraightOver();

        move.Should().HaveMoves(initial, expected);
    }