Added load_map() to map module. Played with pygame
[empire.git] / empire.py
blobd93dc1d89ad0b158317b9a17684ff60fa53f9c1d
1 #!/usr/bin/env python
3 """
5 TODO: add description
6 """
8 import sys, pygame
11 pygame.init()
13 size = width, height = 320, 240
14 black = 0, 0, 0
15 white = 255, 255, 255
17 screen = pygame.display.set_mode(size)
19 """
20 def draw_grid(screen):
21 # create background
22 background = pygame.Surface(screen.get_size())
23 background = background.convert()
24 background.fill(black)
26 # draw lines
27 d = pygame.draw
28 for y in range(9):
29 d.line(background, white, (0, y*10), (399, y*10), 1)
30 for x in range(9):
31 d.line(background, white, (x*10, 0), (x*10, 399), 1)
33 screen.blit(background, (0, 0))
36 while True:
37 for event in pygame.event.get():
38 if event.type == pygame.QUIT:
39 sys.exit()
41 draw_grid(screen)
42 pygame.display.flip()
43 """
46 # ----------------------------------- TESTS ---------------------------------- #
48 import unittest
50 class ModuleTest(unittest.TestCase):
51 """Main test case for this module.
52 """
53 pass
56 def main():
57 unittest.main()
59 if __name__ == '__main__':
60 main()