willowtreeapps / wombats-web-client

Web Client for Wombats
https://github.com/willowtreeapps/wombats-documentation
MIT License
4 stars 2 forks source link

[BUG] Unavailable colors are not disabled in join modal #273

Closed jprehodick closed 7 years ago

jprehodick commented 7 years ago

- What version of the project are you using? Production

- What browser and its version are you using? Chrome Version 56.0.2924.87 (64-bit)

- What did you do? (Steps to Replicate Issue) Joined a game with 4 bots already in it

- What did you expect to see? Color options should be unavailable

- What did you see instead? All colors were available

screen shot 2017-03-10 at 5 47 44 pm

emilyseibert commented 7 years ago

Current in the games panel, when I open the join modal, game state :game/players is in this format:

:game/players [{:db/id 17592186067896, :player/color blue, :player/user {:db/id 17592186045430, :user/github-username dehli}, :player/wombat {:db/id 17592186066955, :wombat/name python}}]

A lot more player information is passed which allows the modal to find the occupied colors.

In the game play panel, the modal only receives the following player information:

:game/players ({:player/user {:user/github-username dehli}})

Which does not contain color information, causing the bug. This issue is an API issue and will be addressed under this ticket.