@@ -16,6 +16,7 @@ struct should
1616 bool shouldShowAvg;
1717 bool needEnter;
1818 bool blindfolded;
19+ bool fmc;
1920};
2021
2122static char getCubeType (std::vector<std::string> &args)
@@ -170,15 +171,43 @@ static bool blindfolded(std::vector<std::string> &args){
170171 return false ;
171172}
172173
174+ static bool fmc (std::vector<std::string> &args){
175+ for (size_t i = 0 ; i < args.size (); i++)
176+ {
177+ if (args.at (i).substr (0 , 2 ) == " -f" || args.at (i).substr (0 , 2 ) == " -F" )
178+ {
179+ if (getCubeType (args) == ' 3' )
180+ {
181+ if (!blindfolded (args))
182+ {
183+ return true ;
184+ }
185+ else
186+ {
187+ std::cout << " Incompatible arguments: -f cannot be used with non-blindfolded cubes.\n " ;
188+ return false ;
189+ }
190+ }
191+ else
192+ {
193+ std::cout << " Incompatible arguments: -f can only be used with 3x3 cubes.\n " ;
194+ return false ;
195+ }
196+ }
197+ }
198+ return false ;
199+ }
200+
173201inline void setup (struct should &Options, cmdLineArgs)
174202{
175203 // Pre-checks
176204 // These are for like `help` or `--version`
177205
178- std::string helpMSG{" How to use CLI_Timer.\n CLI_Timer (cube type) [-b] [--count{number}] [--no_enter] | [c] | [-s{session name}] | [--no_prompt] | [--no_avg] \
206+ std::string helpMSG{" How to use CLI_Timer.\n CLI_Timer (cube type) [-b] | [-f(mc))] [--count{number}] [--no_enter] | [c] | [-s{session name}] | [--no_prompt] | [--no_avg] \
179207 \n\n Argument (cube type) means an NxN of (2)x2 (3)x3 to (7)x7 or (S)kewb, (P)yraminx, (M)egaminx, (C)lock or s(Q)uare-1.\
180208 It is required (why else would you use it?)\n\n [c] means [c]ontinuous, meaning it won't stop after generating one scramble.\
181- \n\n Argument [-b] gives scrambles for blindfolded solves for 3x3, 4x4 and 5x5\
209+ \n\n Argument [-b] gives scrambles for blindfolded solves for 3x3, 4x4 and 5x5 \
210+ \n\n Argument [-f(mc)] gives scrambles for fmc for 3x3. \
182211 \n --count{number} can be used to specify how many scrambles you want. Continuous is impiled. It will then quit (with code 0).\
183212 \n\n Argument [-s] is for saving to a file which name will come directly after [-s] (e.g. CLI_Timer 3 -s3x3_One_Handed).\
184213 \n It will save to a .CLI_T_S (CLI_Timer_Session) file. Check README.md to see where it goes on your OS.\
@@ -217,6 +246,7 @@ inline void setup(struct should &Options, cmdLineArgs)
217246 std::cout << " CLI_Timer version: 1.13.1\n\n " ;
218247 std::cout << " Did some formatting." << std::endl;
219248 std::cout << " Added: blindfolded for 3x3, 4x4 and 5x5." << std::endl;
249+ std::cout << " Added: FMC (The ugliest function ever!)" << std::endl;
220250
221251 exit (EXIT_SUCCESS);
222252 }
@@ -230,4 +260,5 @@ inline void setup(struct should &Options, cmdLineArgs)
230260 Options.shouldShowAvg = shouldShowAvg (arguments);
231261 Options.needEnter = needEnter (arguments);
232262 Options.blindfolded = blindfolded (arguments);
263+ Options.fmc = fmc (arguments);
233264}
0 commit comments