mercredi 30 novembre 2016

Design a rescue game

I would like to design a rescue game

Game has follwing elements

1) Zombie river , it contains zombies and some survivers
2) Safe river
3) One Ship which can acomodate 2 passengers other than sailor.

Ship will take survivers from zombie river to safe river .As soon as ship reaches zombie river, survivers go form hidden state to running state. Whoever comes first takes ship.

As per design I can think of following Objects

Vehichle

LivingBeing
1) Zombie 
2) Surviver

LivingBeings can be in two states hidden or running.

Vehicle can also be in stop, running , boarding , unboarding states.

Ship can be derived from Vehicle.

We also need some random number generator so that we can generate which surviver will board ship. How can I use good design principles like SOLID to solve this problem

Aucun commentaire:

Enregistrer un commentaire