public static void main(String[] args) {
		// TODO Auto-generated method stub
		ChessFrame theFrame=new ChessFrame("Chess- Dan Anderson");
		Game theGame =theFrame.getGame();

		int lastTurnUpdated = theGame.getTurnNumber();
		while(!theGame.isGameOver())
		{
			if(theGame.getTurnNumber()!=lastTurnUpdated)//a turn has elapsed
			{
				theFrame.repaint();
			}
			if(theGame.isWhitesTurn()&&theGame.getWhiteController()!=Game.HUMAN_CONTROLLED)
			{
				
				try{
					theFrame.whiteAI.makeMove();
				}catch (java.lang.IllegalArgumentException ex)
				{
					theGame.displayTieOrWinMessage();
				}
				
			}
			else if(!theGame.isWhitesTurn()&&theGame.getBlackController()!=Game.HUMAN_CONTROLLED)
			{
				try{
					theFrame.blackAI.makeMove();
				}catch (java.lang.IllegalArgumentException ex)
				{
					theGame.displayTieOrWinMessage();
				}
				
			}

			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}