Cleaned up configs
This commit is contained in:
2
cli.py
2
cli.py
@@ -31,7 +31,7 @@ class cursesUI:
|
||||
height, width = self.stdscr.getmaxyx()
|
||||
self.win = curses.newpad(16383, width)
|
||||
|
||||
self.king.createKingdom(50)
|
||||
self.king.createKingdom(startNrVillages)
|
||||
|
||||
while self.running:
|
||||
self.build_screen(self.king, self.ticks)
|
||||
|
||||
28
config.py
28
config.py
@@ -1,34 +1,34 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Define if simulation should be started paused or running
|
||||
start_paused = True
|
||||
# The lenght of one game cycle in milliseconds
|
||||
ticklenght = 0.001
|
||||
# Controls if Tamagotchi stats are shown in absolute vlaues or precentage (Possible values: True/False)
|
||||
show_pct = True
|
||||
# Number of Tamagotchis to be created at the start of the simulation
|
||||
startnr = 60
|
||||
startNrVillages = 50
|
||||
# If the value of a Tamagotchis stats drops below this he will be fed/washed/etc
|
||||
# Synatx [Hunger, Hygiene, Happiness]
|
||||
interventionPoints = [50, 50, 50]
|
||||
# If the hunger stat falls below this level Tamagotchis can be fed
|
||||
feeding_point = 50
|
||||
# If the hygiene stat falls below this level Tamagotchis can be washed
|
||||
washing_point = 50
|
||||
# If the happiness stat falls below this level Tamagotchis can be played with
|
||||
play_point = 50
|
||||
# Controls if Tamagotchi stats are shown in absolute vlaues or precentage (Possible values: True/False)
|
||||
show_pct = True
|
||||
# When new Tamagotchis are created their stats will be be created randomly between these.
|
||||
min_stat = 100
|
||||
max_stat = 200
|
||||
statrange = [100, 200]
|
||||
# Tamagotchis decay at a set rate per tick. The value of decay is randomly chosen between these two.
|
||||
min_decay = 1
|
||||
max_decay = 3
|
||||
decay = [1, 3]
|
||||
# These two define how long it takes a Tamagotchi to perform work (preparing food/washing someone/playing with someone)
|
||||
# The value is choosen randomly between these two. Obviously a lower number is better.
|
||||
min_workpower = 3
|
||||
max_workpower = 6
|
||||
workpower = [3, 6]
|
||||
# This defines the bounds of how much a Tamagotchi can recover when eating/sleeping/playing etc.
|
||||
min_recovery = 10
|
||||
max_recovery = 20
|
||||
recovery = [10, 20]
|
||||
# Defines the range in witch the lifetime of Tamagotichs will be created in ticks
|
||||
min_life = 2000
|
||||
max_life = 3000
|
||||
# Define if simulation should be started paused or running
|
||||
start_paused = True
|
||||
life = [2000, 3000]
|
||||
|
||||
|
||||
|
||||
@@ -21,3 +21,7 @@ wen
|
||||
ein
|
||||
dev
|
||||
ken
|
||||
ir
|
||||
ne
|
||||
he
|
||||
mu
|
||||
16
util.py
16
util.py
@@ -10,14 +10,14 @@ class Util:
|
||||
|
||||
def make_Tamagotchi(self):
|
||||
name = self.generateName()
|
||||
hunger = random.randrange(min_stat,max_stat,1)
|
||||
happiness = random.randrange(min_stat,max_stat,1)
|
||||
hygiene = random.randrange(min_stat,max_stat,1)
|
||||
sleep = random.randrange(min_stat,max_stat,1)
|
||||
decayspeed = random.randrange(min_decay,max_decay,1)
|
||||
potential = random.randrange(min_workpower, max_workpower,1)
|
||||
recovery = random.randrange(min_recovery, max_recovery, 1)
|
||||
lifetime = random.randrange(min_life, max_life, 1)
|
||||
hunger = random.randrange(statrange[0],statrange[1],1)
|
||||
happiness = random.randrange(statrange[0],statrange[1],1)
|
||||
hygiene = random.randrange(statrange[0],statrange[1],1)
|
||||
sleep = random.randrange(statrange[0],statrange[1],1)
|
||||
decayspeed = random.randrange(decay[0],decay[1],1)
|
||||
potential = random.randrange(workpower[0], workpower[1],1)
|
||||
recovery = random.randrange(recovery[0], recovery[1], 1)
|
||||
lifetime = random.randrange(life[0], life[1], 1)
|
||||
|
||||
return Tamagotchi(name,hunger,happiness,hygiene,sleep,decayspeed,potential,recovery,lifetime)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user