@@ -82,6 +89,9 @@ export default class TopLevelComponent extends Component {
*/
ships_to_place = []
+ current_player_display = ''
+ current_opponent_display = ''
+
async vue_on_create() {
console.log('game service', game_service)
this.current_state = game_service.get_game_state()
@@ -91,6 +101,8 @@ export default class TopLevelComponent extends Component {
this.current_state = next_state
this.opponent_rows = game_service.get_current_opponent_state()
this.player_rows = game_service.get_current_player_state()
+ this.current_player_display = game_service.get_player_display(game_service.get_current_player())
+ this.current_opponent_display = game_service.get_player_display(game_service.get_current_opponent())
this.player_is_placing_ships = next_state === GameState.PlayerSetup
if ( !was_refresh && this.player_is_placing_ships ) {
@@ -120,4 +132,8 @@ export default class TopLevelComponent extends Component {
game_service.advance_game_state()
}
}
+
+ confirm_player_change() {
+ game_service.advance_game_state()
+ }
}