edited ship buttons and the board #3

master
Alec 4 years ago
commit 637dd4892b

@ -11,6 +11,10 @@ const template = `
<button @click="ship3" class="shipBtn">3 ships</button>
<button @click="ship4" class="shipBtn">4 ships</button>
<button @click="ship5" class="shipBtn">5 ships</button>
<<<<<<< HEAD
=======
>>>>>>> 19aa3733d0604f37e6875b825eb51ccd4092d4c4
</div>
<div v-if="current_state !== GameState.ChoosingNumberOfShips" class="game-boards-container">
<!-- Opponent's board -->
@ -58,18 +62,26 @@ export default class TopLevelComponent extends Component {
ship1(){
game_service.advance_game_state()
game_service.set_n_boats(1)
}
ship2(){
game_service.advance_game_state()
game_service.set_n_boats(2)
}
ship3(){
game_service.advance_game_state()
game_service.set_n_boats(3)
}
ship4(){
game_service.advance_game_state()
game_service.set_n_boats(4)
}
ship5(){
game_service.advance_game_state()
game_service.set_n_boats(5)
}
<<<<<<< HEAD
}
=======
>>>>>>> 19aa3733d0604f37e6875b825eb51ccd4092d4c4

@ -0,0 +1,16 @@
import { GameState } from './util.js'
/**
* Enum of all possible instructions.
* @type {object}
*/
const instructions = {
[GameState.ChoosingNumberOfShips]: 'Select the number of ships ',
[GameState.PlayerSetup]: 'Place your ships on the grid',
[GameState.PromptPlayerChange]: "It is your opponent's turn",
[GameState.PlayerTurn]: 'Select a cell to fire a missile',
[GameState.PlayerVictory]: 'You won!'
// and so on
}
export { instructions }
Loading…
Cancel
Save