Prompt
Use the rules on the attached pdf to code a simulation in html, css, and javascript that is complete, self-contained, and embeddable. Create a 50 by 50 grid with green squares for grass and some areas with tree icons representing woods. Add some blue squares representing water supply. Add a Next Generation button to advance the simulation to the next round. During play include some rounds with drought which causes 50% of green grass squares to become brown with no food for the rabbits. During drought 20% of rabbits die and 10% of wolves die. During the rounds, include a disease outbreak of Rabbit Hemorrhagic Disease (RHD) that causes 50% of rabbits to die and disappear from the grid. Also add an outbreak of Canine Distemper that kills 25% of wolves to die and disappear from the grid. Insert these outbreaks randomly to ensure non-rrepetitive simulation. Play for 25 rounds. Use a navy blue, white, black, and gray theme for the areas surrounding the 50 by 50 grid. Use wolf profile icons to represent the wolves and rabbit profile icons to represent the rabbits.
Iteration
Make each drought last for 5 generations and provide a disease warning then RHD or Canine Distemper outbreaks occur.
Iteration 2
Add a user selection for 25, 50, 75, or 100 generations. In autoplay mode, show the generation on the screen for 2 seconds to allow the user time to see and recognize the changes. At random intervals, include a severe outbreak of Rabbit Hemorrhagic Disease that kills all the rabbits and causes a system collapse. At random intervals, include a severe outbreak of Canine Distemper that kills 75% of the wolves. In the 75 and 100 generation games, add random drought conditions that last 10 generations.
Reference File