Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make Behaviours support Director's hints

  • Loading branch information...
commit e1466a4555b7c2ee35ff71f183e5ad7817164239 1 parent f4b168a
@szabba authored
Showing with 6 additions and 6 deletions.
  1. +1 −1  src/behaviour.py
  2. +3 −3 src/entity.py
  3. +2 −2 src/quantee.py
View
2  src/behaviour.py
@@ -7,6 +7,6 @@ def prepare(self, prev, curr, next):
raise NotImplementedError()
- def decide(self, dt, event, stage, prev, curr, next):
+ def decide(self, dt, event, stage, hint, prev, curr, next):
raise NotImplementedError()
View
6 src/entity.py
@@ -96,15 +96,15 @@ def past(self):
return self.__prev_wrap
# Behaviour
- def decide(self, dt, event, stage):
- """E.decide(dt, event, stage)
+ def decide(self, dt, event, stage, hint):
+ """E.decide(dt, event, stage, hint)
Decide what to do in the current step.
"""
self.__behaviour.decide(
dt, event,
- stage,
+ stage, hint,
self.__prev, self.__curr, self.__next)
def act(self):
View
4 src/quantee.py
@@ -24,7 +24,7 @@ class DoNothing(Behaviour):
def prepare(self, prev, curr, next):
pass
- def decide(self, dt, event, stage, prev, curr, next):
+ def decide(self, dt, event, stage, hint, prev, curr, next):
pass
@@ -61,7 +61,7 @@ def prepare(self, prev, curr, next):
curr.passed = die_after - 1 if die_after is not None else die_after
next.passed = die_after - 1 if die_after is not None else die_after
- def decide(self, dt, events, stage, prev, curr, next):
+ def decide(self, dt, events, stage, hint, prev, curr, next):
# Calculate the next position
s = self.__speed
Please sign in to comment.
Something went wrong with that request. Please try again.