Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasisDasyras committed Jun 7, 2017
2 parents 0ad594e + ec04b7f commit 3ef4580
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/game/FileEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,28 @@ public void calculatePoints(String username, boolean level, boolean result) {
* for win
*/
int i = this.searchEditor(username);
if (i != -1) {//ðïéá ðåñéðôùóç âãáæåé -1??????????
if (i != -1) {
if (level) {
rankFile.get(i).setNumberOfHard(rankFile.get(i).getNumberOfHard() +1);
if (result) {
int sumPoints = rankFile.get(i).getPoints() + 8;
rankFile.get(i).setPoints(sumPoints);
rankFile.get(i).setWinsHard(rankFile.get(i).getWinsHard()+1);
} else {
int sumPoints = rankFile.get(i).getPoints() - 2;
rankFile.get(i).setPoints(sumPoints);
rankFile.get(i).setLosesHard(rankFile.get(i).getLosesHard()+1);
}
} else {
rankFile.get(i).setNumberOfEasy(rankFile.get(i).getNumberOfEasy() +1 );
if (result) {
int sumPoints = rankFile.get(i).getPoints() + 4;
rankFile.get(i).setPoints(sumPoints);
rankFile.get(i).setWinsEasy(rankFile.get(i).getWinsEasy() +1 );
} else {
int sumPoints = rankFile.get(i).getPoints() - 3;
rankFile.get(i).setPoints(sumPoints);
rankFile.get(i).setLosesEasy(rankFile.get(i).getLosesEasy() +1);
}
}
}
Expand Down

0 comments on commit 3ef4580

Please sign in to comment.