Debug response
This commit is contained in:
parent
3c423c7122
commit
b04bce2be6
4 changed files with 3 additions and 4 deletions
|
@ -65,6 +65,9 @@ public class Completion{
|
|||
public void addTry(Puzzle currentPuzzle, byte[] response) {
|
||||
if (score <= 0){
|
||||
tries++;
|
||||
System.out.println("debug try");
|
||||
System.out.println(currentPuzzle.getSoluce());
|
||||
System.out.println(response);
|
||||
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.)));
|
||||
|
|
|
@ -12,7 +12,6 @@ import java.util.List;
|
|||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.password4j.Hash;
|
||||
import com.password4j.Password;
|
||||
|
||||
import dev.peerat.backend.Configuration;
|
||||
|
|
|
@ -2,8 +2,6 @@ package dev.peerat.backend.routes.admins;
|
|||
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import org.jose4j.json.internal.json_simple.JSONObject;
|
||||
|
||||
import dev.peerat.backend.bonus.extract.RouteDoc;
|
||||
import dev.peerat.backend.model.PeerAtUser;
|
||||
import dev.peerat.backend.repository.DatabaseRepository;
|
||||
|
|
|
@ -14,7 +14,6 @@ import dev.peerat.backend.utils.Mail;
|
|||
import dev.peerat.framework.Context;
|
||||
import dev.peerat.framework.HttpReader;
|
||||
import dev.peerat.framework.HttpWriter;
|
||||
import dev.peerat.framework.RequestType;
|
||||
import dev.peerat.framework.Route;
|
||||
import dev.peerat.framework.Router;
|
||||
import dev.peerat.framework.utils.json.JsonMap;
|
||||
|
|
Loading…
Add table
Reference in a new issue