Pārlūkot izejas kodu

Added resetMap()

master
Noëlle Anthony pirms 7 gadiem
vecāks
revīzija
b307e8c4f6
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6
    0
      CellMap.py

+ 6
- 0
CellMap.py Parādīt failu

@@ -111,6 +111,12 @@ class CellMap:
else:
self.printScreen()

def resetMap(self):
""" Resets the map to its initial state, allowing the user to experiment
with death/birth limits and number of repetitions on a single map.
"""
self.genmap = self.initial

def createMap(self):
""" Initializes an x by y grid.
x is width, y is height

Notiek ielāde…
Atcelt
Saglabāt