private QCell getStateFromAction(QCell currentState, Action ac) {
		int endI = currentState.row;
		int endJ = currentState.col;
		if (ac == Action.LEFT) {
			endJ--;
		}
		if (ac == Action.RIGHT) {
			endJ++;
		}
		if (ac == Action.DOWN) {
			endI++;
		}
		if (ac == Action.UP) {
			endI--;
		}
		
		if (endI < 0 || endI > 5 || endJ < 0 || endJ > 5 || maze[endI][endJ].wall) {
			return currentState;
		} else {
			return maze[endI][endJ];
		}
	}