Skip to content
Snippets Groups Projects
Commit d1358d5b authored by dsjohns2's avatar dsjohns2
Browse files

functioning game

parent ebd0687b
No related branches found
No related tags found
No related merge requests found
Game.java 100644 → 100755
......@@ -3,6 +3,7 @@ package com.company;
import java.util.List;
import java.util.Random;
import java.util.Vector;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
/**
......@@ -23,19 +24,15 @@ public class Game {
Square new_square = new Square();
if(i==0 || i==1 | i==6 | i==7){
new_square.occupied = true;
Piece new_piece = new Piece();
new_piece.name = get_piece_name(i, j);
new_square.name = get_piece_name(i, j);
new_square.x = i;
new_square.y = j;
if(i<2){
new_piece.white = false;
new_square.white = false;
}
else {
new_piece.white = true;
new_square.white = true;
}
int[] location = new int[2];
location[0] = i;
location[1] = j;
new_piece.location = location;
new_square.piece = new_piece;
}
else{
new_square.occupied = false;
......@@ -43,6 +40,18 @@ public class Game {
board[i][j] = new_square;
}
}
add_piece_to_location(5, 2, "Q", false, true);
add_piece_to_location(6, 3, "", true, false);
}
public void add_piece_to_location(int x, int y, String name, boolean white, boolean occupied){
Square new_square = new Square();
new_square.occupied = occupied;
new_square.name = name;
new_square.white = white;
new_square.x = x;
new_square.y = y;
this.board[x][y] = new_square;
}
/**
......@@ -88,11 +97,11 @@ public class Game {
for(int j=0; j<y_dim; j++){
Square cur_square = board[i][j];
System.out.print("|");
if(cur_square.occupied && cur_square.piece.white) {
System.out.print(ANSI_GREEN + cur_square.piece.name + ANSI_RESET);
if(cur_square.occupied && cur_square.white) {
System.out.print(ANSI_GREEN + cur_square.name + ANSI_RESET);
}
else if(cur_square.occupied && !cur_square.piece.white) {
System.out.print(ANSI_BLUE + cur_square.piece.name + ANSI_RESET);
else if(cur_square.occupied && !cur_square.white) {
System.out.print(ANSI_BLUE + cur_square.name + ANSI_RESET);
}
else{
System.out.print(" ");
......@@ -113,11 +122,37 @@ public class Game {
* @throws InterruptedException
*/
public int make_move() throws InterruptedException {
Square[][][] legal_moves = get_legal_moves(white_turn);
Square[][][] legal_moves = get_all_moves(white_turn, this.board);
/*
for(int i=0; i<legal_moves.length; i++){
TimeUnit.SECONDS.sleep(1);
print_board(legal_moves[i]);
}
*/
/* Check for end of game */
if(legal_moves.length == 0){
if(white_turn){
boolean stalemate_flag = true;
List<Square[][]> next_move_legal_moves = get_legal_moves(!white_turn, this.board);
for(int j=0; j<next_move_legal_moves.size(); j++) {
boolean king_found = false;
for (int k = 0; k < x_dim; k++) {
for (int l = 0; l < y_dim; l++) {
if(next_move_legal_moves.get(j)[k][l].occupied && next_move_legal_moves.get(j)[k][l].name == "K" && next_move_legal_moves.get(j)[k][l].white == white_turn){
king_found = true;
}
}
}
if(!king_found){
stalemate_flag = false;
break;
}
}
if(stalemate_flag){
return 0;
}
else if(!white_turn){
return 1;
}
else{
......@@ -136,41 +171,80 @@ public class Game {
* @return a legal move
*/
public Square[][] pick_move(Square[][][] legal_moves){
if(legal_moves.length == 1){
return(legal_moves[0]);
}
Random rand = new Random();
int n = rand.nextInt(legal_moves.length-1);
return(legal_moves[n]);
}
public Square[][][] get_all_moves(boolean white, Square[][] board){
List<Square[][]> legal_moves = get_legal_moves(white, board);
Square[][][] new_legal_moves = remove_moves_into_check(white, legal_moves);
return new_legal_moves;
}
/**
* A method to get all of the legal moves available to the player about to move
* @param color the player about to move
* @param white the player about to move
* @return an array of legal moves/board states
*/
public Square[][][] get_legal_moves(boolean color){
public List<Square[][]> get_legal_moves(boolean white, Square[][] board){
List<Square[][]> legal_moves = new Vector<Square[][]>();
for(int i=0; i<x_dim; i++) {
for (int j = 0; j < y_dim; j++) {
if(this.board[i][j].occupied && this.board[i][j].piece.white == color) {
int[][] squares = this.board[i][j].piece.squares_that_can_be_taken(this.board);
for(int k=0; k<squares.length; k++){
if (board[i][j].occupied && board[i][j].white == white) {
int[][] squares = board[i][j].squares_that_can_be_taken(board);
for (int k = 0; k < squares.length; k++) {
/* copy board */
Square[][] new_board = new Square[this.board.length][8];
for(int row=0; row<this.board.length; row++){
for(int col=0; col<new_board.length; col++) {
new_board[row][col] = new Square(this.board[row][col]);
Square[][] new_board = new Square[board.length][8];
for (int row = 0; row < board.length; row++) {
for (int col = 0; col < new_board.length; col++) {
new_board[row][col] = new Square(board[row][col]);
}
}
/* add new piece */
new_board[squares[k][0]][squares[k][1]] = new Square(new_board[i][j]);
new_board[squares[k][0]][squares[k][1]].x = squares[k][0];
new_board[squares[k][0]][squares[k][1]].y = squares[k][1];
/* remove old piece */
new_board[i][j].occupied = false;
/* add new piece */
new_board[squares[k][0]][squares[k][1]].occupied = true;
new_board[squares[k][0]][squares[k][1]].piece = new Piece(board[i][j].piece);
/* add new board state to list */
legal_moves.add(new_board);
}
}
}
}
return legal_moves;
}
/**
* A method to remove the legal moves ending in check
* @param legal_moves
* @return
*/
public Square [][][] remove_moves_into_check(boolean white, List<Square[][]> legal_moves){
for(int i=0; i<legal_moves.size(); i++){
List<Square[][]> next_move_legal_moves = get_legal_moves(!white, legal_moves.get(i));
for(int j=0; j<next_move_legal_moves.size(); j++) {
boolean king_found = false;
for (int k = 0; k < x_dim; k++) {
for (int l = 0; l < y_dim; l++) {
if(next_move_legal_moves.get(j)[k][l].occupied && next_move_legal_moves.get(j)[k][l].name == "K" && next_move_legal_moves.get(j)[k][l].white == white){
king_found = true;
}
}
}
if(!king_found){
legal_moves.set(i, null);
break;
}
}
}
int max_legal_moves_size = legal_moves.size();
for(int i=0; i<max_legal_moves_size; i++){
legal_moves.remove(null);
}
return legal_moves.toArray(new Square[legal_moves.size()][][]);
}
}
\ No newline at end of file
Main.java 100644 → 100755
......@@ -3,7 +3,7 @@ package com.company;
import java.util.concurrent.TimeUnit;
/**
* The class that runs the program
* The class that runs the game
*/
public class Main {
public static void main(String[] args) throws InterruptedException {
......@@ -16,13 +16,13 @@ public class Main {
int end_of_game = -1;
while(end_of_game == -1){
end_of_game = my_game.make_move();
TimeUnit.SECONDS.sleep(1);
//TimeUnit.SECONDS.sleep(1);
my_game.print_board(my_game.board);
}
if(end_of_game == 0){
System.out.println("Stalemate");
}
if(end_of_game == 1){
else if(end_of_game == 1){
System.out.println("White Wins");
}
else{
......
package com.company;
import java.util.Arrays;
import java.util.List;
import java.util.Vector;
/**
* The piece class represents a movable piece in the game.
*/
public class Piece {
/* King = K
* Queen = Q
* Rook = R
* Bishop = B
* Knight = N
* Pawn = P
*/
public String name;
public boolean white;
public int[] location;
/**
* This is the default constructor that initializes a piece.
*/
public Piece(){
this.name = "";
this.white = true;
this.location = new int[2];
}
/**
* Copy Constructor
* @param other an different Piece
*/
public Piece(Piece other){
this.name = other.name;
this.white = other.white;
this.location = other.location;
}
/**
* A method to return the possible locations the current piece can reach given its current location
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] squares_that_can_be_taken(Square[][] board){
if(this.name == "P" && this.white){
return white_pawn_squares(board);
}
else if(this.name == "P" && !this.white){
return black_pawn_squares(board);
}
else if(this.name == "R"){
return rook_squares(board);
}
else if(this.name == "N"){
return knight_squares(board);
}
else if(this.name == "B"){
return bishop_squares(board);
}
else if(this.name == "Q"){
return queen_squares(board);
}
else{
return king_squares(board);
}
}
/**
* A helper method returning the possible locations of a white pawn
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] white_pawn_squares(Square[][] board){
List<int[]> squares = new Vector<int[]>();
int x = this.location[0];
int y = this.location[1];
/* move forward one */
if(x-1>=0 && !board[x-1][y].occupied){
squares.addAll(legal_square_addition(x-1, y));
}
/* move forward two */
if(x==6 && !board[x-1][y].occupied && !board[x-2][y].occupied){
squares.addAll(legal_square_addition(x-2, y));
}
/* take piece left */
if(x-1 >= 0 && y-1 >= 0 && board[x-1][y-1].occupied && !board[x-1][y-1].piece.white){
squares.addAll(legal_square_addition(x-1, y-1));
}
/* take piece right */
if(x-1 >= 0 && y+1 <= 7 && board[x-1][y+1].occupied && !board[x-1][y+1].piece.white){
squares.addAll(legal_square_addition(x-1, y+1));
}
return squares.toArray(new int[squares.size()][2]);
}
public List<int[]> legal_square_addition(int new_x, int new_y){
List<int[]> squares = new Vector<int[]>();
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
return squares;
}
/**
* A helper method returning the possible locations of a black pawn
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] black_pawn_squares(Square[][] board){
List<int[]> squares = new Vector<int[]>();
int x = this.location[0];
int y = this.location[1];
/* move forward one */
if(x+1<=7 && !board[x+1][y].occupied){
squares.addAll(legal_square_addition(x+1, y));
}
/* move forward two */
if(x==1 && !board[x+1][y].occupied && !board[x+2][y].occupied){
squares.addAll(legal_square_addition(x+2, y));
}
/* take piece left */
if(x+1 <= 7 && y-1 >= 0 && board[x+1][y-1].occupied && board[x+1][y-1].piece.white){
squares.addAll(legal_square_addition(x+1, y-1));
}
/* take piece right */
if(x+1 <= 7 && y+1 <= 7 && board[x+1][y+1].occupied && board[x+1][y+1].piece.white){
squares.addAll(legal_square_addition(x+1, y+1));
}
return squares.toArray(new int[squares.size()][2]);
}
/**
* A method to determine the possible square locations in a straight line from x, y
* @param board the current state of the board
* @param x_inc the x direction of the line
* @param y_inc the y direction of the line
* @return a list of tuples representing x and y, the locations that can be reached
*/
public List<int[]> line(Square[][] board, int x_inc, int y_inc){
List<int[]> squares = new Vector<int[]>();
int x = this.location[0];
int y = this.location[1];
int new_x = x+x_inc;
int new_y = y+y_inc;
while(new_x>=0 && new_x<=7 && new_y>=0 && new_y<=7){
if(board[new_x][new_y].occupied){
if(board[new_x][new_y].piece.white != board[x][y].piece.white){
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
}
break;
}
else{
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
new_x = new_x+x_inc;
new_y = new_y+y_inc;
}
}
return squares;
}
/**
* A helper method returning the possible locations of a rook
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] rook_squares(Square[][] board){
List<int[]> squares = new Vector<int[]>();
/* Up */
squares.addAll(line(board, -1, 0));
/* Down */
squares.addAll(line(board, 1, 0));
/* Left */
squares.addAll(line(board, 0, -1));
/* Right */
squares.addAll(line(board, 0, 1));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A helper method returning the possible locations of a bishop
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] bishop_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
/* Up - Left */
squares.addAll(line(board, -1, -1));
/* Up - Right */
squares.addAll(line(board, -1, 1));
/* Down - Left */
squares.addAll(line(board, 1, -1));
/* Down - Right */
squares.addAll(line(board, 1, 1));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A method to check if the current piece can reach new_x, new_y from x, y
* @param board the current state of the board
* @param x current x location
* @param y current y location
* @param new_x target x location
* @param new_y target y location
* @return A list of tuples representing x and y, the locations that can be reached
*/
public List<int[]> square_checker(Square[][] board, int x, int y, int new_x, int new_y){
List<int[]> squares = new Vector<int[]>();
if(new_x >= 0 && new_x <= 7 && new_y >= 0 && new_y <= 7){
if(!board[new_x][new_y].occupied || board[x][y].piece.white != board[new_x][new_y].piece.white) {
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
}
}
return squares;
}
/**
* A helper method returning the possible locations of a knight
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] knight_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
int x = this.location[0];
int y = this.location[1];
squares.addAll(square_checker(board, x, y, x-1, y-2));
squares.addAll(square_checker(board, x, y, x-1, y+2));
squares.addAll(square_checker(board, x, y, x-2, y-1));
squares.addAll(square_checker(board, x, y, x-2, y+1));
squares.addAll(square_checker(board, x, y, x+1, y-2));
squares.addAll(square_checker(board, x, y, x+1, y+2));
squares.addAll(square_checker(board, x, y, x+2, y-1));
squares.addAll(square_checker(board, x, y, x+2, y+1));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A helper method returning the possible locations of a queen
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] queen_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
squares.addAll(Arrays.asList(bishop_squares(board)));
squares.addAll(Arrays.asList(rook_squares(board)));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A helper method returning the possible locations of a king
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] king_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
int x = this.location[0];
int y = this.location[1];
squares.addAll(square_checker(board, x, y, x-1, y-1));
squares.addAll(square_checker(board, x, y, x-1, y+1));
squares.addAll(square_checker(board, x, y, x, y-1));
squares.addAll(square_checker(board, x, y, x, y+1));
squares.addAll(square_checker(board, x, y, x+1, y-1));
squares.addAll(square_checker(board, x, y, x+1, y+1));
squares.addAll(square_checker(board, x, y, x-1, y));
squares.addAll(square_checker(board, x, y, x+1, y));
return squares.toArray(new int[squares.size()][2]);
}
}
Square.java 100644 → 100755
package com.company;
import java.util.Arrays;
import java.util.List;
import java.util.Vector;
/**
* This class is what makes up the game board.
*/
public class Square {
public boolean occupied;
public Piece piece;
public String name;
public boolean white;
public int x;
public int y;
/**
* A default constructor
*/
public Square(){
this.occupied = false;
this.piece = new Piece();
this.name = "";
this.white = true;
this.x = -1;
this.y = -1;
}
/**
......@@ -21,6 +31,253 @@ public class Square {
*/
public Square(Square other){
this.occupied = other.occupied;
this.piece = new Piece(other.piece);
this.name = other.name;
this.white = other.white;
this.x = other.x;
this.y = other.y;
}
/**
* A method to return the possible locations the current piece can reach given its current location
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] squares_that_can_be_taken(Square[][] board){
if(this.name == "P" && this.white){
return white_pawn_squares(board);
}
else if(this.name == "P" && !this.white){
return black_pawn_squares(board);
}
else if(this.name == "R"){
return rook_squares(board);
}
else if(this.name == "N"){
return knight_squares(board);
}
else if(this.name == "B"){
return bishop_squares(board);
}
else if(this.name == "Q"){
return queen_squares(board);
}
else{
return king_squares(board);
}
}
/**
* A helper method returning the possible locations of a white pawn
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] white_pawn_squares(Square[][] board){
List<int[]> squares = new Vector<int[]>();
int x = this.x;
int y = this.y;
/* move forward one */
if(x-1>=0 && !board[x-1][y].occupied){
squares.addAll(legal_square_addition(x-1, y));
}
/* move forward two */
if(x==6 && !board[x-1][y].occupied && !board[x-2][y].occupied){
squares.addAll(legal_square_addition(x-2, y));
}
/* take piece left */
if(x-1 >= 0 && y-1 >= 0 && board[x-1][y-1].occupied && !board[x-1][y-1].white){
squares.addAll(legal_square_addition(x-1, y-1));
}
/* take piece right */
if(x-1 >= 0 && y+1 <= 7 && board[x-1][y+1].occupied && !board[x-1][y+1].white){
squares.addAll(legal_square_addition(x-1, y+1));
}
return squares.toArray(new int[squares.size()][2]);
}
public List<int[]> legal_square_addition(int new_x, int new_y){
List<int[]> squares = new Vector<int[]>();
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
return squares;
}
/**
* A helper method returning the possible locations of a black pawn
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] black_pawn_squares(Square[][] board){
List<int[]> squares = new Vector<int[]>();
int x = this.x;
int y = this.y;
/* move forward one */
if(x+1<=7 && !board[x+1][y].occupied){
squares.addAll(legal_square_addition(x+1, y));
}
/* move forward two */
if(x==1 && !board[x+1][y].occupied && !board[x+2][y].occupied){
squares.addAll(legal_square_addition(x+2, y));
}
/* take piece left */
if(x+1 <= 7 && y-1 >= 0 && board[x+1][y-1].occupied && board[x+1][y-1].white){
squares.addAll(legal_square_addition(x+1, y-1));
}
/* take piece right */
if(x+1 <= 7 && y+1 <= 7 && board[x+1][y+1].occupied && board[x+1][y+1].white){
squares.addAll(legal_square_addition(x+1, y+1));
}
return squares.toArray(new int[squares.size()][2]);
}
/**
* A method to determine the possible square locations in a straight line from x, y
* @param board the current state of the board
* @param x_inc the x direction of the line
* @param y_inc the y direction of the line
* @return a list of tuples representing x and y, the locations that can be reached
*/
public List<int[]> line(Square[][] board, int x_inc, int y_inc){
List<int[]> squares = new Vector<int[]>();
int x = this.x;
int y = this.y;
int new_x = x+x_inc;
int new_y = y+y_inc;
while(new_x>=0 && new_x<=7 && new_y>=0 && new_y<=7){
if(board[new_x][new_y].occupied){
if(board[new_x][new_y].white != board[x][y].white){
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
}
break;
}
else{
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
new_x = new_x+x_inc;
new_y = new_y+y_inc;
}
}
return squares;
}
/**
* A helper method returning the possible locations of a rook
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] rook_squares(Square[][] board){
List<int[]> squares = new Vector<int[]>();
/* Up */
squares.addAll(line(board, -1, 0));
/* Down */
squares.addAll(line(board, 1, 0));
/* Left */
squares.addAll(line(board, 0, -1));
/* Right */
squares.addAll(line(board, 0, 1));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A helper method returning the possible locations of a bishop
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] bishop_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
/* Up - Left */
squares.addAll(line(board, -1, -1));
/* Up - Right */
squares.addAll(line(board, -1, 1));
/* Down - Left */
squares.addAll(line(board, 1, -1));
/* Down - Right */
squares.addAll(line(board, 1, 1));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A method to check if the current piece can reach new_x, new_y from x, y
* @param board the current state of the board
* @param x current x location
* @param y current y location
* @param new_x target x location
* @param new_y target y location
* @return A list of tuples representing x and y, the locations that can be reached
*/
public List<int[]> square_checker(Square[][] board, int x, int y, int new_x, int new_y){
List<int[]> squares = new Vector<int[]>();
if(new_x >= 0 && new_x <= 7 && new_y >= 0 && new_y <= 7){
if(!board[new_x][new_y].occupied || board[x][y].white != board[new_x][new_y].white) {
int[] square = new int[2];
square[0] = new_x;
square[1] = new_y;
squares.add(square);
}
}
return squares;
}
/**
* A helper method returning the possible locations of a knight
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] knight_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
int x = this.x;
int y = this.y;
squares.addAll(square_checker(board, x, y, x-1, y-2));
squares.addAll(square_checker(board, x, y, x-1, y+2));
squares.addAll(square_checker(board, x, y, x-2, y-1));
squares.addAll(square_checker(board, x, y, x-2, y+1));
squares.addAll(square_checker(board, x, y, x+1, y-2));
squares.addAll(square_checker(board, x, y, x+1, y+2));
squares.addAll(square_checker(board, x, y, x+2, y-1));
squares.addAll(square_checker(board, x, y, x+2, y+1));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A helper method returning the possible locations of a queen
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] queen_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
squares.addAll(Arrays.asList(bishop_squares(board)));
squares.addAll(Arrays.asList(rook_squares(board)));
return squares.toArray(new int[squares.size()][2]);
}
/**
* A helper method returning the possible locations of a king
* @param board the current state of the board
* @return an array of tuples representing x and y, the locations that can be reached
*/
public int[][] king_squares(Square[][] board) {
List<int[]> squares = new Vector<int[]>();
int x = this.x;
int y = this.y;
squares.addAll(square_checker(board, x, y, x-1, y-1));
squares.addAll(square_checker(board, x, y, x-1, y+1));
squares.addAll(square_checker(board, x, y, x, y-1));
squares.addAll(square_checker(board, x, y, x, y+1));
squares.addAll(square_checker(board, x, y, x+1, y-1));
squares.addAll(square_checker(board, x, y, x+1, y+1));
squares.addAll(square_checker(board, x, y, x-1, y));
squares.addAll(square_checker(board, x, y, x+1, y));
return squares.toArray(new int[squares.size()][2]);
}
}
Test.java 100644 → 100755
......@@ -45,6 +45,7 @@ public class Test {
/**
* A method to test the legal_square_addition method
*/
/*
public void legal_square_addition_test() throws InterruptedException {
Piece test_piece = new Piece();
List<int[]> squares = new Vector<int[]>();
......@@ -54,6 +55,7 @@ public class Test {
squares.add(square);
assert(test_piece.legal_square_addition(2, 3) == squares);
}
*/
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment