// Copyright Kyle Fuller (c) 2005-07 | You are NOT alloud to redistrubite, etc.. Ask for permission on copyright {AT} kylefuller.co.uk
#include <iostream>
#include <time.h>
using namespace std;
int scrambleCube()
{
int m;
int samount;
int foo;
char key;
char mainm[] = "rlfbud";
char sub;
cout << "How many moves do you want your scramble?\n";
cin >> samount;
srand((unsigned) time(0));
cout << "\n";
for (foo = 1; foo <= samount; foo++)
{
m = rand() % 6;
cout << mainm[m] << " \t";
}
cout << "\nScrambled with: " << samount << " moves\n\n";
}
int timeCube()
{
cout << "Press spacebar to stop/start?\n";
cin >> samount;
}
int main(void)
{
int option;
cout << "Hello, what would you like to do?\n Press the following keys to do it\n\t0 - Exit\n\t1 - Scramble cube\n\t2 - Stopwatch\n";
cin >> option;
switch(option)
{
case 0:
return 0;
case 1:
scrambleCube();
case 2:
timeCube();
}
}