@pompidup/kingdomino-engine 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -213,6 +213,7 @@ type GameEngine = {
|
|
|
213
213
|
placeDomino: (command: PlaceDominoCommand) => GameState;
|
|
214
214
|
discardDomino: (command: DiscardDominoCommand) => GameState;
|
|
215
215
|
getResults: (command: GetResultCommand) => GameWithResults;
|
|
216
|
+
calculateScore: (command: CalculateScoreCommand) => Score;
|
|
216
217
|
};
|
|
217
218
|
```
|
|
218
219
|
|
|
@@ -298,6 +299,10 @@ Allows a player to discard a domino if they cannot place it.
|
|
|
298
299
|
|
|
299
300
|
Calculates and returns the final game results.
|
|
300
301
|
|
|
302
|
+
#### calculateScore(command: CalculateScoreCommand): Score
|
|
303
|
+
|
|
304
|
+
Calculates and returns the score of a kingdom.
|
|
305
|
+
|
|
301
306
|
## Advanced Usage
|
|
302
307
|
|
|
303
308
|
For more advanced usage and detailed API documentation, please refer to the source code and inline comments.
|