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

Overview
Comment:xPos fixed
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:f08571ec15851cc8127fdee4944c35e54705db0fb25dbbf6d1f17b35bf2ac813
User & Date: sarah 2018-05-18 18:49:28
Context
2018-05-18
19:36
Working on Cookies check-in: 689de052ff user: sarah tags: trunk
18:49
xPos fixed check-in: f08571ec15 user: sarah tags: trunk
18:31
fixed for you check-in: f267d0dc8a user: zie tags: trunk
Changes

Changes to finalproject/finalproject.cpp.

96
97
98
99
100
101
102
103
104
105

106
107
108
109

110
111
112
113

114
115
116
117

118
119
120
121
122
123
124

cout<< "\nbefore usernove:" << "xPos="<<xPos<<" yPos="<<yPos << "\n";
Move(UserMove);
cout<< "after usernove:" << "xPos="<<xPos<<" yPos="<<yPos << "\n";

// When you reset a xPos, you have to clear the character at the old location first.
// you are not doing that here... yet :)
if(xPos<1)
 {cout << "xPos <1, resetting back to 1\n";
       xPos=1;

 }
 if(xPos>18)
{cout << "xPos > 19, resetting back to 19\n";
      xPos=18;

}
if(yPos<0)
{cout << "yPos< 0, resetting back to 0\n";
      yPos=0;

}
if(yPos>39)
{cout << "yPos > 39, resetting back to 39\n";
      yPos=39;

}
     
cout << "move end" <<"xPos="<<xPos<<" yPos="<<yPos << "\n";
     
}









|

|
>

|

|
>




>




>







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

cout<< "\nbefore usernove:" << "xPos="<<xPos<<" yPos="<<yPos << "\n";
Move(UserMove);
cout<< "after usernove:" << "xPos="<<xPos<<" yPos="<<yPos << "\n";

// When you reset a xPos, you have to clear the character at the old location first.
// you are not doing that here... yet :)
if(xPos<0)
 {cout << "xPos <1, resetting back to 1\n";
       xPos=0;
       Screen[xPos][yPos] = '^';
 }
 if(xPos>19)
{cout << "xPos > 19, resetting back to 19\n";
      xPos=19;
      Screen[xPos][yPos] = 'v';
}
if(yPos<0)
{cout << "yPos< 0, resetting back to 0\n";
      yPos=0;
      Screen[xPos][yPos] = '<';
}
if(yPos>39)
{cout << "yPos > 39, resetting back to 39\n";
      yPos=39;
      Screen[xPos][yPos] = '>';
}
     
cout << "move end" <<"xPos="<<xPos<<" yPos="<<yPos << "\n";
     
}