Browse Source

doch nochmal kleine Veränderungen

ateubert 7 years ago
parent
commit
01eee520a5
1 changed files with 4 additions and 4 deletions
  1. 4 4
      maze_fertig.py

+ 4 - 4
maze_fertig.py

181
         """
181
         """
182
         x0, y0 = cell
182
         x0, y0 = cell
183
         x1, y1 = neighbor
183
         x1, y1 = neighbor
184
-        # vertikal									#
184
+        # vertikal									
185
         if x0 == x1:
185
         if x0 == x1:
186
             x = x0
186
             x = x0
187
             y = (y0 + y1) / 2
187
             y = (y0 + y1) / 2
217
 
217
 
218
 
218
 
219
 #ZUSATZ: OPTIONEN/HILFEN
219
 #ZUSATZ: OPTIONEN/HILFEN
220
-if __name__ == '__main__':								#optparse wird eingesetzt, um den jeweiligen Stand/Status abzufragen 
221
-											
220
+if __name__ == '__main__':								#optparse laesst dich die jeweiligen Parameter in der  
221
+											#command line aendern
222
      from optparse import OptionParser
222
      from optparse import OptionParser
223
 
223
 
224
      parser = OptionParser(description="Random maze game")
224
      parser = OptionParser(description="Random maze game")
230
                        help="cell size (default 10)")
230
                        help="cell size (default 10)")
231
      args, _ = parser.parse_args()
231
      args, _ = parser.parse_args()
232
 
232
 
233
-     for arg in ('width', 'height'):							#Option verfuegbar, die Hoehe und Breite zu aendern
233
+     for arg in ('width', 'height'):							
234
          if getattr(args, arg) % 2 == 0:
234
          if getattr(args, arg) % 2 == 0:
235
              setattr(args, arg, getattr(args, arg) + 1)
235
              setattr(args, arg, getattr(args, arg) + 1)
236
              print "Warning: %s muss ungerade sein, benutze %d stattdessen" % \
236
              print "Warning: %s muss ungerade sein, benutze %d stattdessen" % \