@ -42,7 +42,7 @@ In this file, firstly, the name of the game, the version and the authors are spe
* `available_cards` contains the cards by id, which can have an `image` and `back_image`, this last one is not required when the `default_back` property is set.
* `available_cards` contains the cards by id, which can have an `image` and `back_image`, this last one is not required when the `default_back` property is set.
* `piles` contains the card piles common to all players, these are named, and can have default cards placed in them.
* `piles` contains the card piles common to all players, these are named, and can have default cards placed in them.
* `player_piles` are the same as `piles` but specific to each player, so when the game is setup, a clone is created for each of the players.
* `player_piles` are the same as `piles` but specific to each player, so when the game is setup, a clone is created for each of the players.
* lastly, `default_back`, which isn't required as long as all thee cards have a `back_image` property, has the back image which will be used when `back_image` isn't specified.
* lastly, `default_back`, which isn't required as long as all the cards have a `back_image` property, has the back image which will be used when `back_image` isn't specified.
Then we have the script, in this case `game.rhai`:
Then we have the script, in this case `game.rhai`:
@ -110,4 +110,4 @@ See for example the `shuffle` function, which is provided by the environment.
Go to the [rhai book](https://schungx.github.io/rhai/language/index.html) for the language reference.
Go to the [rhai book](https://schungx.github.io/rhai/language/index.html) for the language reference.
### Common errors:
### Common errors:
* When taking more cards than are available from a pile, `()` (null or undefined) is returned
* When taking more cards than are available from a pile, `()` (null or undefined) is returned, that happens for example when too many people try to play a game where a specific number of cards from a deck are give to each player, and there are too many players for the amount of cards in the deck