Constructor
new gameObject()
Constructs a new game object with a default score, nutrition, and
pre-defined fortunes.
- Source:
Methods
cumulateNutritions(dish)
Cumulate the nutrition values of the game object with the nutrition
values of a dish.
Parameters:
| Name | Type | Description |
|---|---|---|
dish |
Object | An object representing a dish with nutrition values. |
- Source:
decrementScore()
Decrement the score of the game.
- Source:
getFortune() → {string}
Get a fortune from the game object based on the current score and
weirdness factor.
- Source:
Returns:
A randomly selected fortune.
- Type
- string
incrementScore()
Increment the score of the game.
- Source:
incrementWeird()
Increment the weirdness factor of the game.
- Source: