Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.py b/main.py
index 610e013..26a2f73 100644
--- a/main.py
+++ b/main.py
@@ -39,6 +39,7 @@ ranger = Ranger(window_h, window_w, ranger_speed)
# Cutter
cutter_time = 100
+tree_cutting_time = 100
cutter_speed = 4
cutter = []
@@ -107,12 +108,14 @@ while True:
for arbol in trees:
for cortador in cutter:
if cortador.collides_with(arbol):
- trees.remove(arbol)
+ cortador.cut_trees = True
+ tree_cutting_time += 1
+ if cortador.cut_trees == True and tree_cutting_time == 100:
+ trees.remove(arbol)
- if cutter_time == 100:
+ if cutter_time == 300:
cutter.append( Cutter(window_h, window_w, cutter_speed) )
cutter_time = 0
-
cutter_time += 1
for arbol in trees: