-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgoals.py
41 lines (27 loc) · 1.01 KB
/
goals.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import arcade
class NormalGoal(arcade.Sprite):
def __init__(self, filename, scale, stay_normal_iterations):
super().__init__(filename, scale)
self.wait_steps = stay_normal_iterations
self.stay_normal_iterations = stay_normal_iterations
def reduce_wait_steps(self):
self.wait_steps -= 1
def reset_wait_steps(self):
self.wait_steps = self.stay_normal_iterations
def get_wait_steps(self):
return self.wait_steps
def update(self):
pass
class AnomalousGoal(arcade.Sprite):
def __init__(self, filename, scale, stay_anomalous_iterations):
super().__init__(filename, scale)
self.wait_steps = stay_anomalous_iterations
self.stay_anomalous_iterations = stay_anomalous_iterations
def reduce_wait_steps(self):
self.wait_steps -= 1
def reset_wait_steps(self):
self.wait_steps = self.stay_anomalous_iterations
def get_wait_steps(self):
return self.wait_steps
def update(self):
pass