diff options
Diffstat (limited to 'dev/pacmath.activity/mazeSetup.py')
-rw-r--r-- | dev/pacmath.activity/mazeSetup.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/dev/pacmath.activity/mazeSetup.py b/dev/pacmath.activity/mazeSetup.py index 7d3930f..a1ee8c2 100644 --- a/dev/pacmath.activity/mazeSetup.py +++ b/dev/pacmath.activity/mazeSetup.py @@ -1,7 +1,7 @@ #! /usr/bin/env python """Setup the maze so it could be drawn in the screen @license: U{http://creativecommons.org/licenses/by-sa/3.0/us/} -@var FILLED: whether or nott the filled wall images are used +@var FILLED: whether or not the filled wall images are used """ import pygame @@ -17,7 +17,8 @@ class mazeSetup: def __init__ (self, screen, MAZE_SIZE): """ Initialize the maze setup - @param screen: the screen in which we will draw + @type screen: pygame.display + @param screen: the screen in which we will draw @param MAZE_SIZE: the size of the maze """ @@ -35,7 +36,8 @@ class mazeSetup: def drawPoint(self, screen, x, y): """ Draw a certain point of the maze on the screen - @param screen: the screen to draw in + @type screen: pygame.display + @param screen: the screen to draw in @param x: the x coordinate of the maze map @param y: the y coordinate of the maze map """ @@ -80,7 +82,8 @@ class mazeSetup: def drawMaze(self, screen, MAZE_SIZE): """ Draw the whole maze - @param screen: the screen to draw into + @type screen: pygame.display + @param screen: the screen to draw into @param MAZE_SIZE: the maze size """ @@ -97,7 +100,8 @@ class mazeSetup: plots @param x: x coordinate @param y: y coordinate - @return a converted image + @rtype: loaded, converted image + @return: The correct wall image for the given plot """ file = 'EMPTY' @@ -153,6 +157,12 @@ class mazeSetup: else: return False - def redrawMaze(self, screen, mazeSize = 25): - self.drawMaze( screen, mazeSize ) + def redrawMaze(self, screen, MAZE_SIZE = 25): + """ + Draws the whole maze and updates the display + @type screen: pygame.display + @param screen: the screen to draw into + @param MAZE_SIZE: the size of the maze + """ + self.drawMaze( screen, MAZE_SIZE ) pygame.display.update(0,0,625,625) |