togglable initial FoodObject spawn
All checks were successful
Build Simulation and Test / Run All Tests (push) Successful in 32s
All checks were successful
Build Simulation and Test / Run All Tests (push) Successful in 32s
This commit is contained in:
parent
049525ca59
commit
a1b39f2484
3
main.py
3
main.py
@ -26,7 +26,7 @@ GRID_HEIGHT = 15 # Number of cells vertically
|
|||||||
CELL_SIZE = 20 # Size of each cell in pixels
|
CELL_SIZE = 20 # Size of each cell in pixels
|
||||||
|
|
||||||
DEFAULT_TPS = 20 # Number of ticks per second for the simulation
|
DEFAULT_TPS = 20 # Number of ticks per second for the simulation
|
||||||
FOOD_SPAWNING = True
|
FOOD_SPAWNING = False
|
||||||
|
|
||||||
|
|
||||||
def draw_grid(screen, camera, showing_grid=True):
|
def draw_grid(screen, camera, showing_grid=True):
|
||||||
@ -150,6 +150,7 @@ def main():
|
|||||||
# sets seed to 67 >_<
|
# sets seed to 67 >_<
|
||||||
random.seed(67)
|
random.seed(67)
|
||||||
|
|
||||||
|
if FOOD_SPAWNING:
|
||||||
world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100))))
|
world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100))))
|
||||||
|
|
||||||
running = True
|
running = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user