diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2019-03-05 01:22:18 +0100 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2019-03-05 01:22:18 +0100 |
commit | 325f53962c0bf2e4f0c469445b00c773982fc0c7 (patch) | |
tree | 0841c17ac25e73a656f19d27bdf3bca37aecaee3 /frontend | |
parent | Remove star imports (diff) | |
download | seven-wonders-325f53962c0bf2e4f0c469445b00c773982fc0c7.tar.gz seven-wonders-325f53962c0bf2e4f0c469445b00c773982fc0c7.tar.bz2 seven-wonders-325f53962c0bf2e4f0c469445b00c773982fc0c7.zip |
Fix types in model.js
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/src/api/model.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/frontend/src/api/model.js b/frontend/src/api/model.js index 78846afd..422b7d6d 100644 --- a/frontend/src/api/model.js +++ b/frontend/src/api/model.js @@ -49,6 +49,19 @@ export type ApiTable = { nbPlayers: number, }; +export type ApiScience = { + jokers: number, + nbWheels: number, + nbCompasses: number, + nbTablets: number, +} + +export type ApiMilitary = { + nbShields: number, + totalPoints: number, + nbDefeatTokens: number, +} + export type ApiBoard = { playerIndex: number, wonder: ApiWonder, @@ -65,7 +78,7 @@ export type ApiWonder = { initialResource: ApiResourceType, stages: ApiWonderStage[], image: string, - nbBuiltStages: Int, + nbBuiltStages: number, buildability: ApiWonderBuildability, } @@ -80,6 +93,13 @@ export type HandRotationDirection = 'LEFT' | 'RIGHT'; export type ApiAction = 'PLAY' | 'PLAY_2' | 'PLAY_LAST' | 'PICK_NEIGHBOR_GUILD' | 'WAIT'; +export type Color = 'BLUE' | 'GREEN' | 'RED' | 'BROWN' | 'GREY' | 'PURPLE' | 'YELLOW'; + +export type ApiRequirements = { + gold: number, + resources: ApiResources +} + export type ApiCard = { name: string, color: Color, |