Skip to content

Jbibay009/Strategy-Pattern

Repository files navigation

Strategy-Pattern

Game App Strategy Pattern

#Suppose we have three types of characters in a GameApp:

  1. Knight: Attacks with a sword; uses 3 strategies to defend (shield, dodge, magic barrier)
  2. Wizard: Casts spells; uses magic barrier to defend
  3. Archer: Shoots arrows; uses dodge to to defend

Implement two types of Strategy: A. DefenseStrategy 1. Shield 2. Dodge 3. CreateMagic

B. AttackStrategy 1. CastSpell 2. ShootArrow 3. SwingSword

Strategy Pattern UML Diagram

About

Game App Strategy Pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages