Skip to content

An example simulating a farm of animals using design patterns.

Notifications You must be signed in to change notification settings

dranidis/animal-farm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status

animal-farm

An example simulating a farm of animals using design patterns.

Currently implementing the following design patterns:

  • Template
  • State

Already implemented

  • Instead of simulating a whole day in a method, break the method so that it simulates a single step and then returns. Each step could be an hour and the method could be called simulateStep.
  • Maybe use the State pattern for the simulatestep (that's something we did not see but it is not so difficult)

Ideas for expansion

  • Create other animals with different behaviour
  • Create the animals via an Abstract Factory
  • Having more than one animal in the farm...
  • Animals interacting?
  • Other creatures in the farm, ...
  • Other entities in the farm, ...