https://github.com/jeremywildsmith/gameoflife
Java Game of Life
https://github.com/jeremywildsmith/gameoflife
Last synced: 2 months ago
JSON representation
Java Game of Life
- Host: GitHub
- URL: https://github.com/jeremywildsmith/gameoflife
- Owner: JeremyWildsmith
- Created: 2016-12-12T14:21:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-12T14:23:41.000Z (over 8 years ago)
- Last Synced: 2025-01-22T21:14:45.809Z (4 months ago)
- Language: Java
- Size: 181 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme
Awesome Lists containing this project
README
====================
README Assignment 2B
====================Packages:
ca.bcit.comp2526.a2b.graphic
- Set of classes for working with graphics in visual representation of simulationca.bcit.comp2526.a2b.res
- Graphics (pngs) used in simulation.ca.bcit.comp2526.a2b.simulation
- All classes pretaining to the logic of conducting the actual simulation.ca.bcit.comp2526.a2b.simulation.behavior
- The different behaviors that make up an organism---------------------
Design Explanation:Organisms:
Stratedgy design pattern used to encapsulate shared behaviors accross organisms in world.
All organisms can be decomposed into the following behaviors:
- Accessibility Behavior
- Composes the logic in determining what areas are accessible to the
organism. I.e, cannot move to water, can only move two spaces etc..
- Reproduction Behavior
- The logic behind when an organism can reproduce and how many children.
- Hunting Behavior
- The logic behind what the organism consumes and any other hunting rules.
- Steering Behavior
- Behavior determines where organisms heads towards.
- Graphic Behavior
- The logic behind the organisms visual representation in the world.Simulation:
The world simulation has been abstracted into an interface. This allows for a
wrapper class to add behavior such as:
- Buffered Simulation:
- Simulates steps of a simulation ahead of time and buffers each step's
result. This allows for complex simulations that can have some steps
taking several seconds at a time to process to be played back nicely
with little stutter.
- Auto-Played Simulation
- Wraps a simulation to provide auto-playing behavior.
- World simulation
- The simulation for a game of life.Usage
Simulation Configuration Window pops up first and allows users to specify the
main simulation parameters. Organisms can be added via the organisms tab, however
all default organsims are already added to the list.Once simulation begins, the program will run the simulation in the background and
display the progress. Once completed, the results will be displayed to the user
visually.