Title: Optional Video: Polymorphic Game of Life: Ants and Predators
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- Optional Video: Polymorphic Game of Life: Ants and Predators lecture video (Time: 33:50)
- Optional Video: Polymorphic Game of Life: Ants and Predators document

- When Arrays were covered we created a "game of Life" that just had Ants. In this video we construct a "game of Life" that includes Predators along with the ants. Predators need to eat Ants to stay alive.
- This program will use an abstract class called Organism. The Ants and Predators will be represented as classes which extend Organism. The overall grid will be represented as a 2 dimensional array of Organism. Polymorphism makes all of this work.