public void upgradePawn(Point location, Piece newPiece)
	{
		if(!this.isOnBoard(location))
		{
			throw new AssertionError("This location: "+location+"isn't on the board");
		}
		
		if(!(newPiece instanceof Queen ||newPiece instanceof Rook ||newPiece instanceof Bishop||newPiece instanceof Knight))//if it isn't a queen, rook, bishop or knight, we can't upgrade it
		{
			throw new AssertionError("A pawn can't be upgraded to a"+newPiece.getClass().toString());
		}
		
		if(!(this.getPiece(location)instanceof Pawn))//we can't upgrade something that isn't a pawn
		{
			throw new AssertionError("You can't upgrade a "+ newPiece.getClass().toString());
		}
		
		newPiece.setLocation(location);
		
		theGrid[location.x][location.y]=newPiece;
	}