Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The bunny is in moveFromCoord, not coord #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericwerk
Copy link

Not sure why you have both a "coord" and a "moveFromCoord", but you want the latter here.

@VengantMjolnir
Copy link

I don't think this is correct. 'coord' is the animal's current position while moveFromCoord is its previous coordinate. This is used in the StartMoveToCoord() method in Act(), where it is passed a next tile that is retrieved from the Environment with a weighting towards the animals current 'forward' direction. This is determined from its previous position.

I have not debugged the app to ensure it is correctly removing the animal from the Map with 'coord', but I suspect it is. Your change would cause the animal to lose the ability to move in a weighted direction. The other wrinkle is that a Map isn't a list by exact coordinate, but rather a list by 'region'. This is likely why your change appears to work since the coordinates near each other are likely in the same region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants