Ejemplo n.º 1
0
 public void pushActionGameOver() {
   // display message game over
   Toast toast = Toast.makeText(getApplicationContext(), "Game Over", Toast.LENGTH_LONG);
   toast.setGravity(Gravity.CENTER, 0, 0);
   toast.show();
   // delete table game data
   gameService.deleteTableGame(getApplicationContext());
   // delete table player data
   playerService.deleteTablePlayers(getApplicationContext());
   // get next game data
   populateTableGameInfo();
 }
Ejemplo n.º 2
0
 public void pushActionFinalPlayerList() {
   GameService gameService = new GameService();
   GameDTO currentGame = gameService.getGame(getApplicationContext());
   // update status set to 3 - final
   gameService.updateGameFinal(getApplicationContext());
   if (currentGame != null) {
     // delete table player if has any data
     playerService.deleteTablePlayers(getApplicationContext());
     // populate with final list Players
     populateTablePlayers(currentGame.getTeam1Id(), currentGame.getTeam2Id());
   }
 }