Attributes class Move
This commit is contained in:
parent
e6633701ff
commit
1a0faded2c
|
|
@ -1,6 +1,8 @@
|
||||||
package backend;
|
package backend;
|
||||||
|
|
||||||
public class Move {
|
public class Move {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
package backend;
|
package backend;
|
||||||
|
|
||||||
public class PieceCreation {
|
public class PieceCreation {
|
||||||
public Piece createPiece(int x, int y, PieceType type, boolean isWhite) {
|
|
||||||
|
public static Piece createPiece(int x, int y, PieceType type, boolean isWhite) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Pawn: return new Pawn(x, y, isWhite);
|
case Pawn: return new Pawn(x, y, isWhite);
|
||||||
case Rook: return new Rook(x, y, isWhite);
|
case Rook: return new Rook(x, y, isWhite);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue