removed quirk code
[pallanguli.git] / tests.py
blob7422f093e31839a765a2105a415d73b22cbed2f4
1 import nose
2 from pallanguli import *
4 def test_player():
5 maxseeds = BOARD_SIZE * SEEDS_PER_CUP
6 p1 = Player(maxseeds - (SEEDS_PER_CUP-1))
7 list(p1.distribute())
8 assert p1.store == 1
10 def test_board_simple():
11 player_store = BOARD_SIZE * SEEDS_PER_CUP
12 b = Board(Player(player_store),
13 Player(player_store))
15 assert len(b) == BOARD_SIZE * 2, "Board must be twice the length"
17 for seeds in b:
18 assert seeds == SEEDS_PER_CUP
20 b[2] = 9
21 assert b[BOARD_SIZE*2+2] == b[2]
23 nose.main()