From 1f5fd80bd6baea989c944e5475d1f3746a5a39f9 Mon Sep 17 00:00:00 2001 From: Brandon McCusker Date: Tue, 12 Mar 2024 16:32:34 -0400 Subject: [PATCH] All user board interactions fiex to be correct --- puzzles files/binary/6x6 easy/876868768 | 22 ++++++++++--------- .../legup/puzzle/binary/BinaryController.java | 18 +++++++-------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/puzzles files/binary/6x6 easy/876868768 b/puzzles files/binary/6x6 easy/876868768 index a7ac3d25f..ceefaefff 100644 --- a/puzzles files/binary/6x6 easy/876868768 +++ b/puzzles files/binary/6x6 easy/876868768 @@ -3,18 +3,20 @@ - - - - - - + + + + + + + + - - - - + + + + diff --git a/src/main/java/edu/rpi/legup/puzzle/binary/BinaryController.java b/src/main/java/edu/rpi/legup/puzzle/binary/BinaryController.java index 9189f7ebe..ef519dd16 100644 --- a/src/main/java/edu/rpi/legup/puzzle/binary/BinaryController.java +++ b/src/main/java/edu/rpi/legup/puzzle/binary/BinaryController.java @@ -15,27 +15,27 @@ public void changeCell(MouseEvent e, PuzzleElement data) { this.boardView.getSelectionPopupMenu().show(boardView, this.boardView.getCanvas().getX() + e.getX(), this.boardView.getCanvas().getY() + e.getY()); } else { - if (cell.getData() == -2) { - data.setData(0); + if (cell.getData() == 0) { + data.setData(1); } else { - if (cell.getData() == 0) { - data.setData(-1); + if (cell.getData() == 1) { + data.setData(2); } else { - data.setData(-2); + data.setData(0); } } } } else { if (e.getButton() == MouseEvent.BUTTON3) { - if (cell.getData() == -2) { - data.setData(-1); + if (cell.getData() == 0) { + data.setData(1); } else { - if (cell.getData() == 0) { - data.setData(-2); + if (cell.getData() == 1) { + data.setData(2); } else { data.setData(0);