Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:put clear back
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:87f4730a0d307e1847e344f9d1329bf1da8568c817eb94f0dddee3f7c6dbac86
User & Date: zie 2018-05-18 14:09:02
Context
2018-05-18
15:43
New Class check-in: dcd84e93f9 user: sarah tags: trunk
14:09
put clear back check-in: 87f4730a0d user: zie tags: trunk
14:07
works on macOS now check-in: 7077298ece user: zie tags: trunk
Changes

Changes to finalproject/finalproject.cpp.

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//You can modify and change main()
int main()
{
      PickUpGame* Game = new PickUpGame; //Create a new game object and store it in a object pointer

      char UserMove = ' '; //This is used to store the users input
      do {
           //system("clear"); //Clear the screen before printing anything
           cout << "Welcome to cookie pickup. You will move to the cookies by using the arrow keys." << endl; //Program intro
           Game->Print(); //Print the grid out
           cout << "What direction would you like to move in? \n(Move using the arrow keys or type q to quit.) "; //Instructions to the user
           //UserMove = getche(); //Get one character from the user (some compilers have "getche()")
            system("/bin/stty raw"); 
           UserMove = getchar(); //Get one character from the user (Visual Studio 2010 "_getche()" is the new version of "getche()")
     	      system("/bin/stty cooked");
           Game->Move(UserMove); //Process the users input
      } while(UserMove != 'Q' && UserMove != 'q'); //Keep running the program until the user types in a Q or q

      //system("clear"); //Clear the screen
      cout << endl;
      Game->Print(); //Print the final grid out to the user
      cout << endl;

      
      return 0;
}







|










|







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//You can modify and change main()
int main()
{
      PickUpGame* Game = new PickUpGame; //Create a new game object and store it in a object pointer

      char UserMove = ' '; //This is used to store the users input
      do {
           system("clear"); //Clear the screen before printing anything
           cout << "Welcome to cookie pickup. You will move to the cookies by using the arrow keys." << endl; //Program intro
           Game->Print(); //Print the grid out
           cout << "What direction would you like to move in? \n(Move using the arrow keys or type q to quit.) "; //Instructions to the user
           //UserMove = getche(); //Get one character from the user (some compilers have "getche()")
            system("/bin/stty raw"); 
           UserMove = getchar(); //Get one character from the user (Visual Studio 2010 "_getche()" is the new version of "getche()")
     	      system("/bin/stty cooked");
           Game->Move(UserMove); //Process the users input
      } while(UserMove != 'Q' && UserMove != 'q'); //Keep running the program until the user types in a Q or q

      system("clear"); //Clear the screen
      cout << endl;
      Game->Print(); //Print the final grid out to the user
      cout << endl;

      
      return 0;
}