populating the swamp

When Mood Music
2012-04-13 13:57:00 awake the ping of incoming emails

More farting about later, I now have a Swamp class which has a collection to hold creatures. I can add an ogre to a random location, then decide (and for now, report) whether an enemy is to be added, then do any necessary enemy-population augmentation. (The enemies always arrive at (0,0)). I also have a method to report which creatures are currently in the swamp and where they are.

So:

  1. Add an ogre
  2. Will an enemy arrive?
  3. Yes – here it is!

On the next go:

  1. Add an ogre
  2. Will an enemy arrive?
  3. No – poor ogre is lonely (but he likes it that way).
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.