Example #1
0
File: tests.py Project: andyzt/tceh
    def test_unfinished_states(self):
        unfinished_state = list(range(15))
        unfinished_state.append(EMPTY_MARK)
        unfinished_state[0], unfinished_state[-1] = \
            unfinished_state[-1], unfinished_state[0]

        result = is_game_finished(unfinished_state)
        self.assert_equal(result, False)
Example #2
0
    def test_unfinished_states(self):
        unfinished_state = list(range(15))
        unfinished_state.append(EMPTY_MARK)
        unfinished_state[0], unfinished_state[-1] = \
            unfinished_state[-1], unfinished_state[0]

        result = is_game_finished(unfinished_state)
        self.assert_equal(result, False)
Example #3
0
    def test_finished_state(self):
        finished_state = list(range(15))
        finished_state.append(EMPTY_MARK)

        result = is_game_finished(finished_state)
        self.assert_equal(result, True)
Example #4
0
File: tests.py Project: andyzt/tceh
    def test_finished_state(self):
        finished_state = list(range(15))
        finished_state.append(EMPTY_MARK)

        result = is_game_finished(finished_state)
        self.assert_equal(result, True)