Commit d5a54627 authored by Anna Maria Eilertsen's avatar Anna Maria Eilertsen
Browse files

made constant for startcolor

parent 877c8305
......@@ -10,6 +10,7 @@ import inf101.v20.lab4.grid.Grid;
*
*/
public abstract class MNKGame {
private static final Piece startPiece = Piece.BLACK;
private int width;
private int height;
private int k;
......@@ -37,7 +38,7 @@ public abstract class MNKGame {
height = n;
this.k = k;
grid = new Grid<MNKGame.Piece>(width, height, Piece.NONE);
currentPlayer = Piece.BLACK;
currentPlayer = startPiece;
winnerPiece = Piece.NONE;
}
......@@ -288,7 +289,7 @@ public abstract class MNKGame {
* @return the color of the starting piece of this game
*/
public static Piece getStartColor() {
return Piece.BLACK;
return startPiece;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment