diff --git a/cli.py b/cli.py index 9e7a331..e1b4b41 100644 --- a/cli.py +++ b/cli.py @@ -30,7 +30,6 @@ class cursesUI: def build_screen(self, king, ticks): height, width = self.stdscr.getmaxyx() - self.win.move(0, 0) self.win.addstr(0, 0, 'Tamagotchi Colony (alpha) - currently at tick '+str(ticks)+'.') if self.kingdomview: diff --git a/config.py b/config.py index ab75c06..8a1fa6e 100644 --- a/config.py +++ b/config.py @@ -28,5 +28,5 @@ max_workpower = 6 # This defines the bounds of how much a Tamagotchi can recover when eating/sleeping/playing etc. min_recovery = 10 max_recovery = 20 - +# Define if simulation should be started paused or running start_paused = False diff --git a/test.py b/test.py index bd15e4b..ac2886f 100644 --- a/test.py +++ b/test.py @@ -11,24 +11,18 @@ import curses # Temporary test section ticks = 0 - -def make_list(number): - tmp = [] - for n in range(0,number): - tmp.append(Util().make_Tamagotchi()) - return tmp - king = Kinggotchi() -for n in range(0, 30): - king.add_village(Mayorgotchi(make_list(startnr))) - ui = cursesUI(True) +for n in range(0, 30): + king.add_village(Mayorgotchi(Util().make_list_of_Tamagotchis(startnr))) + while True: - ui.build_screen(king,ticks) + ui.build_screen(king, ticks) if not ui.paused: king.step() ticks += 1 if not ui.running: - break \ No newline at end of file + break + \ No newline at end of file diff --git a/util.py b/util.py index 7b52237..e9a33d6 100644 --- a/util.py +++ b/util.py @@ -20,3 +20,9 @@ class Util: recovery = random.randrange(min_recovery, max_recovery, 1) return Tamagotchi(name,hunger,happiness,hygiene,sleep,decayspeed,potential,recovery) + + def make_list_of_Tamagotchis(self, number): + tmp = [] + for n in range(0,number): + tmp.append(self.make_Tamagotchi()) + return tmp