sopra-fs21-group-10/td-server

Buying and placing towers/minions

Closed this issue · 3 comments

bzns commented
  • Upon receiving a PATCH /games/{gameId)/{token} purchase request during the preparation phase from the client, it is checked whether the player has sufficient funds for the requested purchase. In case of sufficient funds, a confirmation status is sent to the client and the purchase is saved to the game and player instances in the database. In case of insufficient funds, an error status code will be sent.
  • In case of an enemy minion purchase, the respective number of minions is added to the next wave of the battle phase to the targeted opponent's player instance.
  • The client receives the updated stats via the next GET /games/{gameId} request

Estimated time: 4h
This task is part of user story #18

towers are there

post /games/towers/{token} = place towers
post /games/minions/{gameId}/{token} = buying minions

70f6065
now shows extraMinions in map