public static int getMemoryIndexFromId(int id) {
        for (int i = 0; i < memoryOptions.length; i++) {
            if (memoryOptions[i].option == id) {
                return i;
            }
        }
        return id;
    }