Board avec les get methodes
This commit is contained in:
parent
6255f0d58f
commit
8095067fe9
|
|
@ -3,19 +3,20 @@ package backend;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Board {
|
public class Board {
|
||||||
|
private int colNum;
|
||||||
|
private int lineNum;
|
||||||
|
|
||||||
public Board(int colNum, int lineNum) {
|
public Board(int colNum, int lineNum) {
|
||||||
//TODO
|
this.colNum=colNum;
|
||||||
|
this.lineNum=lineNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
//TODO
|
return colNum;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
//TODO
|
return lineNum;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTurnNumber() {
|
public int getTurnNumber() {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,21 @@
|
||||||
package backend;
|
package backend;
|
||||||
|
|
||||||
public class Piece {
|
public class Piece {
|
||||||
|
private int x;
|
||||||
|
private int y;
|
||||||
|
|
||||||
|
|
||||||
|
public Piece(int x, int y) {
|
||||||
|
this.x=x;
|
||||||
|
this.y=y;
|
||||||
|
}
|
||||||
|
|
||||||
public int getX() {
|
public int getX() {
|
||||||
return 0;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getY() {
|
public int getY() {
|
||||||
return 0;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PieceType getType() {
|
public PieceType getType() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue