private void watchGame(Game g) { // System.out.println("GAME HAS " + g.rounds() + " ROUNDS"); int teamA = initTeam(g.teamA); int teamB = initTeam(g.teamB); int[] playersA = g.playersA(); int[] playersB = g.playersB(); Player[] rosterA = rosters.get(teamA); Player[] rosterB = rosters.get(teamB); Player[] lineupA = new Player[lineupSize]; Player[] lineupB = new Player[lineupSize]; for (int i = 0; i < lineupSize; i++) { lineupA[i] = rosterA[playersA[i] - 1]; lineupB[i] = rosterB[playersB[i] - 1]; } for (int i = 0; i < g.rounds(); i++) { if (g.round(i).attacksA) processRnd(lineupA, lineupB, g.round(i)); else processRnd(lineupB, lineupA, g.round(i)); } // System.out.println(g.teamA + ": " + g.scoreA + ", " + g.teamB + ": " + g.scoreB); gamesSeen++; }
private void watchLastRound(Game g) { if (true) return; int rounds = g.rounds(); Game.Round lastRound = g.round(rounds - 1); if (attacking) processRnd(myTeam, opposingTeam, lastRound); else processRnd(opposingTeam, myTeam, lastRound); }