function [] = testGameClass
close all
clear all

player1 = SimpleAI('red');
player2 = SimpleAI('blue');

game = Game(player1,player2,2);
if (~isa(game.players,'cell') || length(game.players) ~= 2)
    disp('error in Game constructor for property game.players');
end
if (game.ended ~= false)
    disp('error in Game constructor, game.ended not false');
end
if (~isa(game.board,'Board') || game.board.size ~= 2)
    disp('error in Game constructor, board not created correctly');
end
if (game.players{1}.index ~= 1 || game.players{2}.index ~= 2)
    disp('error in Game constructor, player.index not set correctly for both players');
end

figure(1)
game.draw();
game.board.hexes(1,1).player = 1;
game.board.hexes(1,2).player = 2;
game.board.hexes(2,1).player = 1;
game.showWinner([1 1]);
fprintf('You should see figure 1 with a Close button and a text box showing \nthat it is the red player''s turn.\nYou should be able to click on the Close button and close figure 1\n');

