* @Post: Queries the user for what type to upgrade the pawn to, and does so
	 * @Return: None
	 */
	private void upgradePawn(Piece thePiece) {
		int whatToUpgradeTo=-1; 
		Object answer = null;
		Object[] possibilities = {"Queen", "Knight", "Rook", "Bishop"};
		if(isAI(isWhitesTurn()))//then it is the AI of the current turn
		{
			whatToUpgradeTo= myFrame.getAI(isWhitesTurn()).chooseUpgrade(thePiece.myLocation);
		}else
		{
			while(answer ==null)
			{
				answer = JOptionPane.showInputDialog(null, "Your pawn can now be upgraded. What would you like it to be?", "Upgrade", JOptionPane.PLAIN_MESSAGE, null, possibilities, "Queen");
			}

		}

		Piece newPiece;
		if(answer==possibilities[0]||whatToUpgradeTo==0)
		{
			newPiece=new Queen(thePiece.isWhite, new Point(thePiece.getX(),thePiece.getY()), this.getBoard());
		}else if(answer == possibilities[1]||whatToUpgradeTo==1)
		{
			newPiece = new Knight(thePiece.isWhite, new Point(thePiece.getX(),thePiece.getY()), this.getBoard());
		}else if (answer == possibilities[2]||whatToUpgradeTo==2 )
		{
			newPiece = new Rook(thePiece.isWhite, new Point(thePiece.getX(),thePiece.getY()), this.getBoard());
		}else
		{
			newPiece=new Bishop(thePiece.isWhite, new Point(thePiece.getX(),thePiece.getY()), this.getBoard());
		}
		myBoard.upgradePawn(thePiece.myLocation, newPiece);

	}