Created teleporter map generation and implemented it in level 1.

This commit is contained in:
Niels Serup
2012-08-14 00:28:50 +02:00
parent 5235112424
commit b6700125c4
4 changed files with 170 additions and 26 deletions

View 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()