getting there – maybe

 

When Mood Music
2012-04-15 14:51:00 disappointed Will The Circle Be Unbroken – Hayseed Dixie

I’ve started assembling the actual game – a separate program which calls methods from the Swamp class as needed. It doesn’t quite work yet – the battle section crashes. One reason for this was that I wasn’t checking the current enemy’s type – so the ogre was killing itself!

Having cured this – suicidal ogres are not allowed – and temporarily removed the ‘battle’ section from the game code, the following occurred.:

A swamp is created and an ogre is added.
Turn 1. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 2. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 3. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 4. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 5. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 6. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 7. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 8. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 9.No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 10. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 11. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 12. An enemy parrot arrives.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 13. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 14. An enemy donkey arrives.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 15. Another enemy parrot arrives.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 16. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 17. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 18. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 19. Another enemy donkey arrives.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 20. No enemy has been added.
All creatures move.
A battle should occur here, resulting in the parrot at (1,1) being removed to leave just the ogre at those coordinates.
Turn 21. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are.
Turn 22. Yet another enemy parrot arrives.
All creatures move.
At this point, a battle should occur at (1,1), resulting in the ogre being killed by 2 parrots. But this code isn’t yet called, so the ogre lives on.
Turn 23. No enemy has been added.
All creatures move.
No battle occurs so everyone stays where they are……….

 

This is where the extra methods will be useful. I can create a swamp with creatures where I choose and see whether the battle proceeds as it should.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.