public void useWeapon(int lastKeyPressed) {
		try {
			int dir = 1;
			Point charLoc = new Point(this.getCharacterLocation());
			if (!(grid.get(charLoc).returnCharacter().getWeapon() instanceof RangedWeapon)) {
				if (lastKeyPressed == KeyEvent.VK_A) {
					dir = -1;
				} else if (lastKeyPressed == KeyEvent.VK_D) {
					dir = 1;
				}
				Point side = new Point((int) (getCharacterLocation().getX() + dir), (int) getCharacterLocation().getY());
				Point secondSide = new Point((int) (getCharacterLocation().getX() + dir + dir),
						(int) getCharacterLocation().getY());
				GridSpace target = grid.get(side);
				GridSpace target2 = grid.get(secondSide);

				target.add(grid.get(charLoc).returnCharacter().getWeapon());
				target.sortArrayOfThings();
				target2.add(grid.get(charLoc).returnCharacter().getWeapon());
				target2.sortArrayOfThings();
				dealDamage(target, grid.get(charLoc).returnCharacter().getWeapon(), side);
				dealDamage(target2, grid.get(charLoc).returnCharacter().getWeapon(), secondSide);

			} else {
				if (lastKeyPressed == KeyEvent.VK_A) {
					dir = -1;
				} else if (lastKeyPressed == KeyEvent.VK_D) {
					dir = 1;
				}
				Point side = new Point((int) (getCharacterLocation().getX() + dir), (int) getCharacterLocation().getY());
				GridSpace target = grid.get(side);
				RangedWeapon middleMan = (RangedWeapon) grid.get(charLoc).returnCharacter().getWeapon();
				RangedWeapon newWeapon = new RangedWeapon(middleMan.getSolid(), middleMan.getColor(), middleMan.getL(),
						middleMan.getRange(), middleMan.getSpeed(), middleMan.getName());
				newWeapon.setDamage(middleMan.getDamage());
				newWeapon.setCurrentSpeed(newWeapon.getSpeed() * dir);
				target.add(newWeapon);
				target.sortArrayOfThings();
			}
		} catch (NullPointerException e) {
			System.out.println("Caught useWeapon null pointer error.");
		}

	}