stack_fights

Stack fights is a game in which two armies attacks each other. It implements such design patterns as:

  • Singleton
  • Factory Method
  • Abstract Factory
  • Prototype
  • Adapter
  • Decorator
  • Proxy
  • Observer
  • Command
  • Strategy

Armies are consisteted of the following types of units:

  • infantry
  • armored
  • archer
  • cleric
  • mage
  • wall
  • hero
  • squire

Cleric has an ability to restore units' health. Mage has an ability to clone units.

Observer implies logging of the deaths of all the units, hits from heroes and hits to heroes. The design pattern Command is done as undo and redo commands. Also, there is an opportunity to choose a strategy between Line, Column and Rank during the game.

Special thanks