Java_Chess

.idea
    .name 5 B
    artifacts
       Chess_jar.xml 371 B
    compiler.xml 734 B
    copyright
    description.html 97 B
    encodings.xml 171 B
    libraries
       jansi_1_11.xml 214 B
    misc.xml 5 KB
    modules.xml 261 B
    project-template.xml 91 B
    scopes
       scope_settings.xml 143 B
    uiDesigner.xml 8 KB
    vcs.xml 176 B
    workspace.xml 61 KB
Chess.iml 1 KB
Doxyfile 101 KB
GUI_Manual_Testplan.pdf 437 KB
Graphics
    blackBerolinaPawn.png 1 KB
    blackBishop.png 5 KB
    blackKing.png 8 KB
    blackKnight.png 6 KB
    blackPawn.png 2 KB
    blackQueen.png 8 KB
    blackRook.png 3 KB
    blackWazir.png 1 KB
    whiteBerolinaPawn.png 2 KB
    whiteBishop.png 7 KB
    whiteKing.png 8 KB
    whiteKnight.png 7 KB
    whitePawn.png 4 KB
    whiteQueen.png 10 KB
    whiteRook.png 4 KB
    whiteWazir.png 2 KB
README 342 B
jansi-1.11.jar 111 KB
src
    CHANGES 1001 B
    GUI
       Controller.java 15 KB
       Main.java 360 B
       View.java 14 KB
       textPanel.java 776 B
    Game
       Board.java 5 KB
       CLI.java 5 KB
       Command.java 1022 B
       GameManager.java 11 KB
       GameType.java 74 B
       MoveHandler.java 1 KB
       Player.java 133 B
    META-INF
       MANIFEST.MF 53 B
    Main.java 154 B
    Pieces
       BerolinaPawn.java 1 KB
       Bishop.java 480 B
       BoardSquare.java 4 KB
       King.java 470 B
       Knight.java 846 B
       MoveType.java 530 B
       Pawn.java 1 KB
       Queen.java 474 B
       Rook.java 471 B
       Wazir.java 627 B
    TODO 176 B
    Tests
       BoardTest.java 2 KB
       GameManagerTest.java 21 KB
GameManagerTest.java
package Tests;

import Game.*;
import Pieces.BoardSquare;
import Pieces.Pawn;
import org.junit.Assert;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class GameManagerTest {

    @Test
    public void testHistory() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);

        BoardSquare square = new Pawn(1, 2, Player.BLACK);

        game.addToMoveHist(1, 2, 3, 4, square);

        Command command = (Command)game.MoveHist.pop();

        assertEquals(command.getSourceX(), 1);
        assertEquals(command.getSourceY(), 2);

        assertEquals(command.getDestX(), 3);
        assertEquals(command.getDestY(), 4);

        assertEquals(command.getPlayer(), Player.BLACK);



    }


    @Test
    public void testUndo() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);

        assertEquals(game.undo(), false);

        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        assertEquals(game.undo(), true);

        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);

    }



    //@todo stalemate.
    @Test
    public void testStaleMate() throws Exception {
        GameManager game = new GameManager(GameType.STANDARD);

        CLI.Print(game.gameBoard);

        assertEquals(game.Move(2, 1, 2, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(7, 6, 7, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(7, 1, 7, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(0, 6, 0, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(3, 0, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(0, 7, 0, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(0, 3, 0, 4), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(0, 5, 7, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(0, 4, 2, 6), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(5, 6, 5, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(2, 6, 3, 6), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(4, 7, 5, 6), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(3, 6, 1, 6), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(3, 7, 3, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(1, 6, 1, 7), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(3, 2, 7, 6), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(1, 7, 2, 7), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(5, 6, 6, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


        assertEquals(game.Move(2, 7, 4, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


        assertEquals(game.testStalemate(), true);




    }

    @Test
     public void testMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(0, 0, -55, -55), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(-88, 88, 100, -55), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(0, 0, 0, 0), GameManager.MoveStatus.ERROR);

    }

    @Test
    public void testValidMove() throws Exception {
        GameManager game = new GameManager(GameType.STANDARD);

        assertEquals(game.validMove(0, 0, -55, -55), GameManager.MoveStatus.ERROR);
        assertEquals(game.validMove(-88, 88, 100, -55), GameManager.MoveStatus.ERROR);
        assertEquals(game.validMove(0, 0, 0, 0), GameManager.MoveStatus.ERROR);

        assertEquals(game.validMove(4, 4, 4, 3), GameManager.MoveStatus.ERROR);
    }

    //@new test
    @Test
    public void testPawnHop() throws Exception {
        GameManager game = new GameManager(GameType.STANDARD);

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        game.nextTurn();

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(3, 0, 5, 2), GameManager.MoveStatus.NONE);
        game.nextTurn();

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 2, 5, 5), GameManager.MoveStatus.NONE);

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 6, 5, 4), GameManager.MoveStatus.ERROR);


    }

    //@new test
    @Test
    public void testKingLimit() throws Exception {
        GameManager game = new GameManager(GameType.STANDARD);

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        game.nextTurn();


        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 0, 4, 1), GameManager.MoveStatus.NONE);
        game.nextTurn();


        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 2), GameManager.MoveStatus.NONE);
        game.nextTurn();


        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 2, 4, 0), GameManager.MoveStatus.ERROR);


        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 2, 0, 2), GameManager.MoveStatus.ERROR);

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 2, 1, 5), GameManager.MoveStatus.ERROR);

        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 2, 7, 4), GameManager.MoveStatus.ERROR);


    }

    //@new test, testing for checkmate was inadvertently moving pieces.
    @Test
    public void testCheckMate_notInCheckMate() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);

        //boolean firstmove = true;
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 6, 0, 5), GameManager.MoveStatus.NONE);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 0, 2, 3), GameManager.MoveStatus.NONE);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 5, 0, 4), GameManager.MoveStatus.NONE);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(3, 0, 5, 2), GameManager.MoveStatus.NONE);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 4, 0, 3), GameManager.MoveStatus.NONE);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(2, 3, 5, 6), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.testCheck(false), Player.BLACK);


        assertEquals(game.Move(0, 3, 0, 2), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        //game.testCheck(true);
        assertEquals(game.testCheck(true), Player.BLACK);
        CLI.Print(game.gameBoard);



    }

    @Test
     public void testCheckMate() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);

        //boolean firstmove = true;
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 6, 0, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 0, 2, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 5, 0, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(3, 0, 5, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 4, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(2, 3, 5, 6), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.testCheck(false), Player.BLACK);


        assertEquals(game.Move(0, 3, 0, 2), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        //game.testCheck(true);
        assertEquals(game.testCheck(true), Player.BLACK);
        CLI.Print(game.gameBoard);

        System.out.println("Done.");

    }

    @Test
    public void testCheck() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);

        //boolean firstmove = true;
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 6, 0, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 0, 2, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 5, 0, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(3, 0, 5, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 6, 4, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(2, 3, 4, 5), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 4, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 5, 5, 6), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

        assertEquals(game.testCheck(false), Player.BLACK);


        assertEquals(game.Move(0, 3, 0, 2), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        //game.testCheck(true);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);

        System.out.println("Done.");

    }

    @Test
    public void testMoveIntoCheck() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);

        //boolean firstmove = true;
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(4, 1, 4, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 6, 0, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 0, 2, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 5, 0, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(3, 0, 5, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 4, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(5, 2, 5, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.testCheck(false), Player.NONE);


        assertEquals(game.Move(4, 6, 4, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(0, 1, 0, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(4, 7, 4, 6), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        //game.testCheck(true);
        assertEquals(game.testCheck(true), Player.NONE);
        CLI.Print(game.gameBoard);

        System.out.println("Done.");

    }

    @Test
    public void testFindPieces() throws Exception {
        GameManager game = new GameManager(GameType.STANDARD);
        //int ret;

        BoardSquare startSquare = game.gameBoard.getPiece(0, 0);
        BoardSquare destSquare = game.gameBoard.getPiece(7, 7);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 6));

        startSquare = game.gameBoard.getPiece(0, 0);
        destSquare = game.gameBoard.getPiece(7, 7);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 2));

        startSquare = game.gameBoard.getPiece(0, 0);
        destSquare = game.gameBoard.getPiece(0, 0);
        Assert.assertFalse(game.gameBoard.findPieces(startSquare, destSquare, 1));

        startSquare = game.gameBoard.getPiece(0, 0);
        destSquare = game.gameBoard.getPiece(0, 7);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 2));

        startSquare = game.gameBoard.getPiece(0, 0);
        destSquare = game.gameBoard.getPiece(0, 7);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 6));

        startSquare = game.gameBoard.getPiece(7, 7);
        destSquare = game.gameBoard.getPiece(0, 0);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 2));

        startSquare = game.gameBoard.getPiece(7, 7);
        destSquare = game.gameBoard.getPiece(0, 0);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 6));

        startSquare = game.gameBoard.getPiece(7, 0);
        destSquare = game.gameBoard.getPiece(0, 7);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 6));

        startSquare = game.gameBoard.getPiece(0, 7);
        destSquare = game.gameBoard.getPiece(7, 0);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 6));

        startSquare = game.gameBoard.getPiece(0, 0);
        destSquare = game.gameBoard.getPiece(7, 0);
        Assert.assertTrue(game.gameBoard.findPieces(startSquare, destSquare, 6));


    }

    @Test
    public void testKnightMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(1, 0, 0, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        game.nextTurn();
        assertEquals(game.Move(0, 2, 2, 1), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        //game.playerTurn = ! game.playerTurn;
        assertEquals(game.Move(0, 2, 1, 0), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(1, 0, 2, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(2, 2, 1, 0), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(1, 0, 2, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(2, 2, 4, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(4, 3, 2, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(2, 2, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(0, 3, 1, 1), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);
        assertEquals(game.Move(0, 3, 2, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(2, 4, 4, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(4, 3, 2, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(2, 4, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

    }

    @Test
    public void testPawnMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(0, 1, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(0, 6, 0, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(1, 1, 1, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(1, 6, 1, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(1, 2, 1, 4), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(1, 2, 1, 1), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

    }

    @Test
    public void testPawnCapture() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(0, 1, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(1, 6, 1, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(0, 3, 1, 4), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

    }

    @Test
    public void testBerolinaPawnMove_andCapture() throws Exception {

        GameManager game = new GameManager(GameType.CUSTOM);
        assertEquals(game.Move(0, 1, 0, 3), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(0, 1, 3, 4), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(0, 1, 2, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(4, 6, 3, 5), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(2, 3, 0, 5), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(2, 3, 3, 2), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(2, 3, 2, 2), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(1, 1, 1, 2), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(1, 1, 0, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(3, 5, 2, 4), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(2, 3, 2, 4), GameManager.MoveStatus.CAPTURE);
        CLI.Print(game.gameBoard);

    }

    @Test
    public void testBishopMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(1, 1, 1, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        game.nextTurn();
        assertEquals(game.Move(2, 0, 0, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


    }

    @Test
    public void testQueenMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(2, 1, 2, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        game.nextTurn();
        assertEquals(game.Move(3, 0, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


    }

    @Test
    public void testKingMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(3, 1, 3, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        game.nextTurn();
        assertEquals(game.Move(4, 0, 0, 4), GameManager.MoveStatus.ERROR);
        CLI.Print(game.gameBoard);

        assertEquals(game.Move(4, 0, 3, 1), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


    }

    @Test
    public void testRookMove() throws Exception {

        GameManager game = new GameManager(GameType.STANDARD);
        assertEquals(game.Move(0, 1, 0, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        game.nextTurn();
        assertEquals(game.Move(0, 0, 0, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(0, 2, 7, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);


    }

    @Test
    public void testWazirMove() throws Exception {

        GameManager game = new GameManager(GameType.CUSTOM);
        assertEquals(game.Move(0, 1, 2, 3), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);
        game.nextTurn();
        assertEquals(game.Move(0, 0, 0, 2), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(0, 0, 0, 1), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(0, 1, 0, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);

        game.nextTurn();
        assertEquals(game.Move(0, 2, 2, 2), GameManager.MoveStatus.ERROR);
        assertEquals(game.Move(0, 2, 1, 2), GameManager.MoveStatus.NONE);
        CLI.Print(game.gameBoard);



    }


}