Added yada-yada stuff. Updated some tests
[empire.git] / empire.py
bloba23cc642b037a3b31e89c50c691787ae36053920
1 #!/usr/bin/env python
3 """
5 Copyright (C) 2008 by Florian Hasheider
6 florian.hasheider@googlemail.com
8 Copyright (C) 2008 by Benjamin Kircher
9 benjamin.kircher@gmail.com
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the
23 Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 """
28 import sys, pygame
31 __doc__ = """
33 TODO: add description
34 """
36 pygame.init()
38 size = width, height = 320, 240
39 black = 0, 0, 0
40 white = 255, 255, 255
42 screen = pygame.display.set_mode(size)
44 """
45 def draw_grid(screen):
46 # create background
47 background = pygame.Surface(screen.get_size())
48 background = background.convert()
49 background.fill(black)
51 # draw lines
52 d = pygame.draw
53 for y in range(9):
54 d.line(background, white, (0, y*10), (399, y*10), 1)
55 for x in range(9):
56 d.line(background, white, (x*10, 0), (x*10, 399), 1)
58 screen.blit(background, (0, 0))
61 while True:
62 for event in pygame.event.get():
63 if event.type == pygame.QUIT:
64 sys.exit()
66 draw_grid(screen)
67 pygame.display.flip()
68 """
71 # ----------------------------------- TESTS ---------------------------------- #
73 import unittest
75 class ModuleTest(unittest.TestCase):
76 """Main test case for this module.
77 """
78 pass
81 def main():
82 unittest.main()
84 if __name__ == '__main__':
85 main()