0
0
Fork 0

Detect if an object has been chosen and change the display if it hasn't.

This commit is contained in:
Oliver-Akins 2020-12-19 16:57:40 -07:00
parent e4be57e957
commit dccb0f835f

View file

@ -1,16 +1,16 @@
<template>
<div id="GameView" class="maximize">
<game-board />
<game-board v-if="isGuesser || objectChosen" />
<object-selector v-else />
<player-hand />
<team-reminder />
<discard-hand
v-if="isGuesser"
/>
<discard-hand v-if="isGuesser" />
</div>
</template>
<script>
import DiscardHand from "../components/DiscardHandButton";
import ObjectSelector from "../components/ChooseObject";
import TeamReminder from "../components/TeamReminder";
import GameBoard from "../components/GameBoard";
import PlayerHand from "../components/Hand";
@ -18,6 +18,7 @@ import PlayerHand from "../components/Hand";
export default {
name: `InGame`,
components: {
"object-selector": ObjectSelector,
"team-reminder": TeamReminder,
"discard-hand": DiscardHand,
"player-hand": PlayerHand,
@ -27,6 +28,9 @@ export default {
isGuesser() {
return this.$store.state.role === this.$store.state.guesser_name;
},
objectChosen() {
return this.$store.state.chosen_object != null;
},
},
methods: {},
}