|
|
|
@ -5,14 +5,12 @@ import game_service from '../services/GameState.service.js'
|
|
|
|
|
const template = `
|
|
|
|
|
<div class="top-level-component">
|
|
|
|
|
<div v-if="current_state === GameState.ChoosingNumberOfShips">
|
|
|
|
|
Choose number of ships
|
|
|
|
|
Choose number of ships:
|
|
|
|
|
<button @click="ship1" class="shipBtn">1 ship</button>
|
|
|
|
|
<button @click="ship2" class="shipBtn">2 ships</button>
|
|
|
|
|
<button @click="ship3" class="shipBtn">3 ships</button>
|
|
|
|
|
<button @click="ship4" class="shipBtn">4 ships</button>
|
|
|
|
|
<button @click="ship5" class="shipBtn">5 ships</button>
|
|
|
|
|
|
|
|
|
|
<button @click="bypass">Bypass for now</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="current_state !== GameState.ChoosingNumberOfShips" class="game-boards-container">
|
|
|
|
|
<!-- Opponent's board -->
|
|
|
|
@ -73,7 +71,5 @@ export default class TopLevelComponent extends Component {
|
|
|
|
|
ship5(){
|
|
|
|
|
game_service.advance_game_state()
|
|
|
|
|
}
|
|
|
|
|
bypass() {
|
|
|
|
|
game_service.advance_game_state()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|