This commit is contained in:
Cool Guy
2026-04-30 20:20:14 +00:00
parent 15ffe12fbf
commit a3fdf01848
2 changed files with 16 additions and 0 deletions

View File

@@ -68,4 +68,11 @@ public class HockeyPlayer {
HockeyPlayer p = (HockeyPlayer) o;
return this.name.compareTo(p.name);
}
public void addGame(int goals, int assists, boolean gameWon){
this.goals += goals;
this.assists += assists;
if (gameWon) gamesWon++;
else gamesLost++;
}
}