From 55b74b3568d122e2366ba438dae4108f1484ec3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 29 Feb 2016 06:51:33 +0100 Subject: DB: fix storeTurn() --- core/src/ch/asynk/rustanddust/util/DB.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/util/DB.java b/core/src/ch/asynk/rustanddust/util/DB.java index 25bfc18..a6ad9fd 100644 --- a/core/src/ch/asynk/rustanddust/util/DB.java +++ b/core/src/ch/asynk/rustanddust/util/DB.java @@ -214,13 +214,12 @@ public class DB return getGameId(you, opponent, battle, mode); } - public boolean storeTurn(int game, int p1, int p2, String payload) + public boolean storeTurn(int game, int p, String payload) { try { String hash = getDigest(payload); if (hash == null) return false; - exec(String.format(INSERT_TURN, game, p1, hash, payload, game)); - exec(String.format(UPDATE_GAME, p1, p2, game)); + exec(String.format(INSERT_TURN, game, p, hash, payload)); } catch (SQLiteGdxException e) { RustAndDust.error("storeTurn"); return false; -- cgit v1.1-2-g2b99