Esempio n. 1
0
 public MediaTournamentVO(TournamentVO tournamentVO) {
   this.tournamentVO = tournamentVO;
   this.pointsPerGame = String.valueOf(tournamentVO.getPts() / tournamentVO.getGames());
   this.reboundsPerGame = String.valueOf(tournamentVO.getTotr() / tournamentVO.getGames());
   this.tonoversPerGame = String.valueOf(tournamentVO.getTo() / tournamentVO.getGames());
   this.FTS = calculaFTS(tournamentVO.getFg(), tournamentVO.getFga());
   this.FT2 = calculaFTS(tournamentVO.getFg2(), tournamentVO.getFga2());
   this.FT3 = calculaFTS(tournamentVO.getFg3(), tournamentVO.getFga3());
   this.FT = calculaFTS(tournamentVO.getFt(), tournamentVO.getFqa());
   this.assistsPerGame = String.valueOf(tournamentVO.getAs() / tournamentVO.getGames());
   this.blocksPerGame = String.valueOf(tournamentVO.getBs() / tournamentVO.getGames());
   this.stealsPerGame = String.valueOf(tournamentVO.getSt() / tournamentVO.getGames());
   calulaValoracion();
 }
Esempio n. 2
0
  private void calulaValoracion() {
    int ft = tournamentVO.getFt() - (tournamentVO.getFqa() - tournamentVO.getFt());
    int fg2 = tournamentVO.getFg2() * 2 - (tournamentVO.getFga2() - tournamentVO.getFg2());
    int fg3 = tournamentVO.getFg3() * 3 - (tournamentVO.getFga3() - tournamentVO.getFg3());

    this.valPerGame =
        (ft
                + fg2
                + fg3
                + tournamentVO.getAs()
                + tournamentVO.getBs()
                + tournamentVO.getTotr()
                + tournamentVO.getSt()
                - tournamentVO.getTo())
            / tournamentVO.getGames();
  }