private int parseOption(String option) {
            if(option.equals("1")) {
                    return MAKE_CELL_ALIVE;
            }
            else if (option.equals("2")) {
                    return NEXT_GENERATION;
            }
            else if (option.equals("3")) {
                    return UNDO;
            }
            else if (option.equals("4")) {
                    return REDO;
            }
            else if (option.equals("5")) {
                    return HALT;
            }
            else return INVALID_OPTION;
    }