diff --git a/OOP_D7_Project/src/backend/Teleporter.java b/OOP_D7_Project/src/backend/Teleporter.java index 7dcf792..30ad691 100644 --- a/OOP_D7_Project/src/backend/Teleporter.java +++ b/OOP_D7_Project/src/backend/Teleporter.java @@ -1,14 +1,17 @@ package backend; +//This class is here to deal with the border. We have two state, closed and loop. +//When we select loop the cell will take into account the state of the cell at the opposite of the grid. + public class Teleporter { private int size = 0; public Teleporter(int size) { this.size = size; } public int position(int value, boolean loop) { - int out = 0; - if (loop) { - if (value>=0) { + int out = 0; + if (loop) { // verify if we have clicked on the loop option + if (value>=0) { out = value; if (out>=size) { out = out - size;