Seed7 
 FAQ 
 Manual 
 Screenshots 
 Examples 
 Algorithms 
 Download 
 Links 

 Screenshots 
 Panic 
 Mandelbr 
 Planets 
 Dnafight 
 Sudoku 
 Wator 
 Castle 
 Tetris 
 Pairs 
 Shisen 
 Eliza 
 Mahjong 
 Basic 
 Lander 
 Compiler 
 Screenshots 
Wator Source Code
 previous   up   next 


Planet Wator simulation

Planet Wator simulation

Planet Wator simulation with fish and sharks.

This program simulates the planet WATOR as described in Scientific American Computer Recreations column, Dec 1984. WATOR (or Wa-Tor) is a toroidal (donut-shaped) planet inhabited by fish and sharks. The fish feed on a ubiquitous plankton and the sharks feed on the fish. Time passes in discrete jumps or cycles. During each cycle, fish move randomly to an unoccupied square, and reproduce if old enough. Sharks move to a square occupied by a fish and eat it, if possible, or move to an open square if no meals are available. Sharks will also breed if old enough, but will starve if they do not eat within a specified period of time.

Parameters selected at the beginning of the run are as follows:

  • nfish: Number of fish at start of run-distributed randomly.
  • nsharks: Number of sharks at start, also distributed randomly.
  • fbreed: Number of cycles a fish must exist before reproducing.
  • sbreed: Number of cycles sharks must exist before reproducing.
  • starve: Number of cycles a shark has to find food before starving.

On the screen, fish are green and sharks are blue. After the initial screen is displayed, press any key to start the simulation. During the run, pressing any key will stop the program.


 previous   up   next