Models - STEP-tw/ludo-dvamps GitHub Wiki

Models

Games Manager

State

* Running Games

behaviour

* Create Game
* Get Available Games
* Does Game Exist
* Get Game
* Finish Game

Game

State

* Players
* Event Emitter
* Cells
* Turn
* Status

behaviour

* Generate Cells
* Generate Path
* Add Player
* Does Player Exist
* Get Players Name
* Start
* Roll Dice
* Update Current Player
* Increment Current Player Chances
* Decrement Current Player Chances
* Get Status
* Update Status
* Has Won

Player

State

* Name
* Coins
* Color
* Path
* Event Emitter

behaviour

* Get Name
* Move Coin
* Get Movable Coins
* Set Coin Position
* Get Status

Coin

State

* Id
* Color
* Position
* Event Emitter

behaviour

* Get Position
* Set Position
* Get Color
* Get Status
* Die

Path

State

* Cells

behaviour

* Get Next Position
* Change Coin Position

Turn

State

* Player Ids
* Current Player Id
* Current Player Chances

behaviour

* Update Current Player
* Increase Chance
* Decrease Chance

Cell

State

* Id
* Coins

behaviour

* Add Coin

Safe Cell (extends Cell)

State

* Id
* Coins

behaviour

* Add Coin
* Remove Coin

Unsafe Cell (extends Cell)

State

* Id
* Coins

behaviour

* Add Coin
* Remove Coin
* Kill Coin

Destination Cell (extends Cell)

State

* Id
* Coins

behaviour

* Add Coin
* Get Number Of coins

Home Cell (extends Cell)

State

* Id
* Coins

behaviour

* Add Coin
* Remove Coin

Home