Hello! Welcome to the planet of WaTor! We have four types of creatures here:
- Fish
- A basic creature, the fish feeds off the plantlife of this planet and live peacefully.
- Rabbit Fish
- Much like the fish, except it breeds startlingly fast.
- Shark
- A ravenous creature, the shark will eat any fish it finds. If it doesn't eat in too long, it dies.
- Dolphin
- We're not sure where these creatures come from. They eat fish like a shark, but also eat plants, thus do not starve. The most peculiar part is they seem content with the numbers they have. They appear quite smart... I wonder if they know something we don't...
And that's it! I've heard there's some aliens that were scouting this planet for some reason, but I'm sure that's nothing to worry about.
wator.init sets the program up and allows for some level of customizability.
- The first line sets the width and height, respectively.
- The second line sets how many Fish will spawn, then how long before a Fish duplicates.
- The third line sets how many Sharks will spawn, how long before a Shark duplicates, and how many turns before a shark starves.
Dolphins are randomly generated based on the size of the board. They never starve, and never duplicate.
A certain amount of regular Fish are turned into Rabbit Fish. Rabbit Fish duplicate at twice the rate.
If you're interested in viewing the original version of this project, what I turned in for an assignment, I have a branch called "original" where I hold the code. The main branch contains a version with resorted files, and some minor other changes/bug fixes.