コード例 #1
0
ファイル: test_core.py プロジェクト: SpiffyB/chopsticks
 def test_split_out_of_range_hand_2(self):
     g = core.Game(2, 0, 2, 5)
     g.players[0].hands[0].alive_fingers = 1
     g.players[0].hands[1].alive_fingers = 3
     self.assertEqual(g.logic.split(g, 0, 0, 2, 2, 2), False)
コード例 #2
0
ファイル: test_core.py プロジェクト: SpiffyB/chopsticks
 def test_split_negative_hand_1(self):
     g = core.Game(2, 0, 2, 5)
     g.players[0].hands[0].alive_fingers = 1
     g.players[0].hands[1].alive_fingers = 3
     self.assertEqual(g.logic.split(g, 0, -1, 1, 2, 2), False)
コード例 #3
0
ファイル: test_core.py プロジェクト: SpiffyB/chopsticks
 def test_split_to_greater_num_fingers2(self):
     g = core.Game(2, 0, 2, 5)
     g.players[0].hands[0].alive_fingers = 1
     g.players[0].hands[1].alive_fingers = 3
     self.assertEqual(g.logic.split(g, 0, 0, 1, 2, 6), False)
コード例 #4
0
ファイル: test_core.py プロジェクト: SpiffyB/chopsticks
 def test_split_correct3(self):
     g = core.Game(2, 0, 2, 5)
     g.players[0].hands[0].alive_fingers = 1
     g.players[0].hands[1].alive_fingers = 3
     g.logic.split(g, 0, 0, 1, 2, 2)
     self.assertEqual(g.players[0].hands[0].alive_fingers, 2)
コード例 #5
0
ファイル: test_core.py プロジェクト: SpiffyB/chopsticks
 def test_hit_dead_hand_4(self):
     g = core.Game(2, 0, 2, 5)
     g.players[0].hands[0].alive_fingers = 0
     g.players[0].hands[1].alive_fingers = 0
     self.assertEqual(g.logic.hit(g, 0, 0, 1, 0), False)
コード例 #6
0
ファイル: test_core.py プロジェクト: SpiffyB/chopsticks
 def test_hit_correct_2(self):
     g = core.Game(2, 0, 2, 5)
     g.players[0].hands[0].alive_fingers = 4
     g.players[0].hands[1].alive_fingers = 3
     self.assertEqual(g.logic.hit(g, 0, 1, 1, 0), True)