Skip to content

nCubed/Katas-ImperialArmy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Katas-ImperialArmy

This code challenge is about OO design principles and was presented by Floyd May

Goals

  • The solution should meet the requirements.
  • The solution should be as DRY (don’t repeat yourself) as possible.
  • Not looking for "clever" solutions, but for designs that you’d feel confident to put into production code.

Requirements

  1. All soldiers of the imperial army must know their rank.
  2. A soldier can be ordered to fight to the death, and no one but a soldier can receive such an order.
  3. Some soldiers are archers; all archers are soldiers
  4. Archers must know the number of arrows in their possession.
  5. An archer may be ordered to shoot a distant foe, and no one but an archer can receive such an order.
  6. Some soldiers are horsemen; all horseman are soldiers.
  7. Horsemen must know the horse that has been assigned to them.
  8. A horseman may be ordered to trample the enemies in his path, and no one but a horseman can receive such an order.
  9. Some soldiers belong to the Flying Rain of Fire, whose members are both horsemen and archers in every respect.
  10. A member of the Flying Rain may be ordered to lead the charge, and no one but a member of the Flying Rain can receive such an order.

About

This code challenge is about OO design principles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages