fix...faut pas faire 2 choses en même temps
This commit is contained in:
parent
4f11822c12
commit
8041ddb470
1 changed files with 5 additions and 2 deletions
|
@ -65,10 +65,13 @@ public class Completion{
|
|||
public void addTry(Puzzle currentPuzzle, byte[] response, int chapter){
|
||||
if (score <= 0){
|
||||
tries++;
|
||||
if(chapter < 4) return;
|
||||
if (response != null && Arrays.equals(currentPuzzle.getSoluce(), response)){
|
||||
if (tries > 1) { // Loose 5% each try with a minimum of 1 for score
|
||||
score = (int) Math.ceil(currentPuzzle.getScoreMax() * (1 - ((tries - 1) / 20.)));
|
||||
if(chapter < 4){
|
||||
score = currentPuzzle.getScoreMax();
|
||||
}else{
|
||||
score = (int) Math.ceil(currentPuzzle.getScoreMax() * (1 - ((tries - 1) / 20.)));
|
||||
}
|
||||
// score = currentPuzzle.getScoreMax();
|
||||
if (score < 1)
|
||||
score = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue