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