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.
38 size
= width
, height
= 320, 240
42 screen
= pygame
.display
.set_mode(size
)
45 def draw_grid(screen):
47 background = pygame.Surface(screen.get_size())
48 background = background.convert()
49 background.fill(black)
54 d.line(background, white, (0, y*10), (399, y*10), 1)
56 d.line(background, white, (x*10, 0), (x*10, 399), 1)
58 screen.blit(background, (0, 0))
62 for event in pygame.event.get():
63 if event.type == pygame.QUIT:
71 # ----------------------------------- TESTS ---------------------------------- #
75 class ModuleTest(unittest
.TestCase
):
76 """Main test case for this module.
84 if __name__
== '__main__':