WARRIOR WORKER SETTLER <?php class Worker extends Player { } class Settler extends Player { } class Warrior extends Player { public function attack() { // attack with axe } }
implements MoveBehaviour { public function move() { // walk } } class Run implements MoveBehaviour { public function move() { // run } } class RideHorse implements MoveBehaviour { public function move() { // ride a horse } }
implements AttackBehaviour { public function attack() { // punch } } class AxeAttack implements AttackBehaviour { public function attack() { // attack with axe } } class EyePoke implements AttackBehaviour { public function attack() { // poke in eye } }