seagiants / crystal-hunt

1 stars 0 forks source link

Correctly inactivate action for inactive player #2

Closed bibirico closed 6 years ago

bibirico commented 6 years ago

When its other player's turn, one can still interact with some elements (clicking on ActionTile will select a a skill for example). All interactions during opponent's turn should be impossible.

romaintailhurat commented 6 years ago

A simple isActive props on top level components should do the trick: https://github.com/seagiants/crystal-hunt/blob/cb9526fc5de98af8a0a00e2be16eadb29cd7788d/src/components/GameBoard.tsx#L31

bibirico commented 6 years ago

Yep. To do. It's already avalaible in the boardgame.io api

romaintailhurat commented 6 years ago

Oh, excellent, will use that!

romaintailhurat commented 6 years ago

Implemented in https://github.com/seagiants/crystal-hunt/commit/4d3245821361e3720f323c78f5e3f960bd76874c