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

Overview
Comment:cooke monster is happy now
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256:d9610b5a78ccfe1d06053407e179a7cd085e2e03d3cc70243feede903a862a47
User & Date: zie 2018-05-19 02:19:59
Context
2018-05-19
02:19
cooke monster is happy now Leaf check-in: d9610b5a78 user: zie tags: trunk
2018-05-18
23:06
Figuring out eaten cookie issue check-in: ac75da0465 user: sarah tags: trunk
Changes

Changes to finalproject/finalproject.cpp.

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
119
120
121
122
123
124
125

126
127
128
129
130
131
132
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
};
// DO NOT ALTER OR DELETE THIS CODE (END)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

class MyPickUpGame : public PickUpGame
{
    public:
      int CookieNumber;
      int EatanCookies = 0;
      void createCookies()
      
      {

            CookieNumber = 1 + rand() % 10;

            for (int i = 0; i < CookieNumber; i++)
................................................................................
      {
            char c;
            c = Screen[x][y];
            cout << "checkCookies: " << c << "\n";
            if (c == 'o')
            {
                  cout << "COOKIE HERE!!" << x << y << "\n";

                  return true;
            }
            return false;
      }

      void MyMove(char Direction)
      {
................................................................................
                  break;
            }
      }

      void endgame()
      { 
            cout << "COOKIE MONSTER";
            EatanCookies = EatanCookies + 1;
            cout <<"You have eat"<< EatanCookies << "\n";
            if (EatanCookies == CookieNumber)
            {
                  cout << "You ate " << CookieNumber << "cookie(s)";
                  exit(0);
            }
      }







|







 







>







 







<







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
176
177
178
179
180
181
182

183
184
185
186
187
188
189
};
// DO NOT ALTER OR DELETE THIS CODE (END)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

class MyPickUpGame : public PickUpGame
{
    public:
      int CookieNumber;
      int EatanCookies;
      void createCookies()
      
      {

            CookieNumber = 1 + rand() % 10;

            for (int i = 0; i < CookieNumber; i++)
................................................................................
      {
            char c;
            c = Screen[x][y];
            cout << "checkCookies: " << c << "\n";
            if (c == 'o')
            {
                  cout << "COOKIE HERE!!" << x << y << "\n";
                  EatanCookies++;
                  return true;
            }
            return false;
      }

      void MyMove(char Direction)
      {
................................................................................
                  break;
            }
      }

      void endgame()
      { 
            cout << "COOKIE MONSTER";

            cout <<"You have eat"<< EatanCookies << "\n";
            if (EatanCookies == CookieNumber)
            {
                  cout << "You ate " << CookieNumber << "cookie(s)";
                  exit(0);
            }
      }