Пример #1
0
def test_display_move():
    state1 = SpireState()

    move1_display = state1.display_move(2)
    move2_display = state1.display_move(32)

    state2 = state1.make_move(1)
    move3_display = state2.display_move(2)

    assert move1_display == 'B1E'
    assert move2_display == 'R1E'
    assert move3_display == 'W1E'
Пример #2
0
def test_move_red():
    expected_display2 = """\
  A C E G
7 . . . . 7

5 . . . . 5

3 . . . . 3

1 R . . . 1
  A C E G
>B
"""
    state1 = SpireState()

    state2 = state1.make_move(30)
    display2 = state2.display()

    assert display2 == expected_display2
Пример #3
0
def test_move_black():
    expected_display2 = """\
  A C E G
7 . . . . 7

5 . . . . 5

3 . . . . 3

1 B . . . 1
  A C E G
>W,R
"""
    state1 = SpireState()

    state2 = state1.make_move(0)
    display2 = state2.display()

    assert display2 == expected_display2