Created teleporter map generation and implemented it in level 1.
This commit is contained in:
20
tests/teleportermap_tests.py
Normal file
20
tests/teleportermap_tests.py
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
from __future__ import print_function
|
||||
import unittest
|
||||
from robotgame.logic.teleportermap import *
|
||||
from robotgame.logic.direction import *
|
||||
|
||||
|
||||
class TeleporterMapTest(unittest.TestCase):
|
||||
def test_map_generation(self):
|
||||
for w, h in (
|
||||
(8, 5),
|
||||
(16, 16)
|
||||
):
|
||||
tmap = generate_teleporter_map(w, h)
|
||||
print()
|
||||
print_map(tmap)
|
||||
print()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user