src/GameOfLife/OptionHandler/OptionParser.php
/**
     * Parses the general options which will prevent the simulation from starting.
     *
     * @param Getopt $_options The option list
     *
     * @return Bool True: A general option was used
     *              False: No general option was used
     */
Parses the general options which will prevent the simulation from starting.
@param Getopt $_options The option list

@return Bool True: A general option was used
False: No general option was used
Parses the general options which will prevent the simulation from starting . @param Getopt $_options The option list @return Bool True : A general option was used False : No general option was used
public function parseGeneralOptions(Getopt $_options): Bool
    {
        if ($_options->getOption("version") !== null)
        {
            echo "Game of life version 0.1\n";
            return true;
        }
        elseif ($_options->getOption("help") !== null)
        {
            echo "\n";
            $_options->showHelp(36);
            echo "\n\nThe available colors are: ";
            echo "aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow\n";
            return true;
        }
        return false;
    }
public function parseGeneralOptions ( Getopt $ _options ) : Bool { if ( $ _options -> getOption ( " version " ) !== null ) { echo " Game of life version 0.1 \n " ; return true ; } elseif ( $ _options -> getOption ( " help " ) !== null ) { echo " \n " ; $ _options -> showHelp ( 36 ) ; echo " \n \n The available colors are:  " ; echo " aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow \n " ; return true ; } return false ; }
Parses the general options which will prevent the simulation from starting.
Parses the general options which will prevent the simulation from starting .