@Override
	public void keyPressed(KeyEvent e) {
		//had to use if's because user can change controls at runtime
		if (e.getKeyCode() == controls[0]){
			player.rotatePiece();
		} else if (e.getKeyCode() == controls[1]){
			player.moveLeft();
		} else if (e.getKeyCode() == controls[2]){
			player.moveRight();
		} else if (e.getKeyCode() == controls[3]){
			if (player.getSpeedUp()){
				player.goToBottom();
			} else {
				player.changeDelay(Player.SPEEDUP_DELAY, false);
			}
		} else if (e.getKeyCode() == controls[4]){
			player.spendMana(1);
		} else if (e.getKeyCode() == controls[5]){
			player.spendMana(2);
		} else if (e.getKeyCode() == controls[6]){
			player.spendMana(3);
		} else if (e.getKeyCode() == controls[7]){
			player.spendMana(4);
		}
	}