Skip to content

Commit

Permalink
Fixed leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmv30 committed May 1, 2024
1 parent 9ff9dbe commit 08a6652
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
10 changes: 7 additions & 3 deletions src/main/java/uta/cse3310/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,14 @@ else if (U.ready == -1)
U.color = color.pickColor();

//Add the person to the leaderboard
leaderboard.add(U.Handle,0);

if (!leaderboard.LB.containsKey(U.Handle))
{
leaderboard.add(U.Handle,0);
Players.put(U.Handle,U);
}
//Add it to all players list
Players.put(U.Handle,U);


conn.setAttachment(U.Handle);

if (Players.get(U.Handle).GameType == 2)
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/uta/cse3310/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ char[][] createGrid()
}


/*Random rand = new Random();
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
grid[i][j] = (char) (rand.nextInt(26) + 'A');
}
}*/

return grid;
}
Expand Down

0 comments on commit 08a6652

Please sign in to comment.