diff options
| author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-14 13:07:08 +0200 | 
|---|---|---|
| committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-14 13:07:08 +0200 | 
| commit | 822d89c50a70277186f5c845e4341236548c16b7 (patch) | |
| tree | f1306919615dc786cf7bc5f913d61ea835b99596 /tests | |
| parent | 1f9bba90256f0baf605636a93037f1debdcb4623 (diff) | |
Moving game logic to game/game.py.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_board.py | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/tests/test_board.py b/tests/test_board.py index 0688005..d87e825 100644 --- a/tests/test_board.py +++ b/tests/test_board.py @@ -70,7 +70,7 @@ class TestBoardClass(unittest.TestCase):          self.assertTrue(b.flag_tile(0,0))          self.assertEqual(b.get_mask(0,0), 10) -    def test_flaf_tile_error_conditions(self): +    def test_flag_tile_error_conditions(self):          """ liputus ei onnistu jos avattu, alueen ulkopuolella, outo arvo """          b = Board(2)          b.tiles=[[1,9],[9,9]] @@ -79,4 +79,13 @@ class TestBoardClass(unittest.TestCase):          b.masked[0][0]=0          self.assertFalse(b.flag_tile(0,0))          self.assertFalse(b.flag_tile(2,2)) + +    def test_reveal(self): +        """ paljastuksen jälkeen näkyy laatat sellaisenaan """ +        b = Board(2) +        b.reveal() +        t = b.tiles +        v = b.get_view() +        for i in range(2): +            self.assertEqual(v[i],t[i])          
\ No newline at end of file |