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

Overview
Comment:Debugging statements
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:39b76ecfccc9509ad86229952839011e3fbbd2ed415fe1859050024ef84995d9
User & Date: sarah 2018-05-18 18:17:55
Context
2018-05-18
18:31
fixed for you check-in: f267d0dc8a user: zie tags: trunk
18:17
Debugging statements check-in: 39b76ecfcc user: sarah tags: trunk
18:00
only move once check-in: c9e28386b7 user: zie tags: trunk
Changes

Changes to finalproject/finalproject.cpp.

94
95
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
129
void BoundedMove(char UserMove)
{ 

cout<<"xPos="<<xPos<<" yPos="<<yPos;

if ((xPos> -1) && (xPos<20) && (yPos>-1) && (yPos<40))
{
 cout << "xPos <1, resetting back to 1";

       if(xPos<1)
 {
       xPos=1;

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

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

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

}
     
}

Move(UserMove);

}




};

//You can modify and change main()
int main()
{







<
>

|

>

|

|
>




>




>



>

|

>
>







94
95
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
129
130
131
132
133
134
135
136
void BoundedMove(char UserMove)
{ 

cout<<"xPos="<<xPos<<" yPos="<<yPos;

if ((xPos> -1) && (xPos<20) && (yPos>-1) && (yPos<40))
{

 
       if(xPos<1)
 {cout << "xPos <1, resetting back to 1";
       xPos=1;
       cout<<"xPos="<<xPos<<" yPos="<<yPos;
 }
 if(xPos>18)
{cout << "xPos > 19, resetting back to 19";
      xPos=18;
      cout<<"xPos="<<xPos<<" yPos="<<yPos;
}
if(yPos<0)
{cout << "yPos< 0, resetting back to 0";
      yPos=0;
      cout<<"xPos="<<xPos<<" yPos="<<yPos;
}
if(yPos>39)
{cout << "yPos > 39, resetting back to 39";
      yPos=39;
      cout<<"xPos="<<xPos<<" yPos="<<yPos;
}
     
}
cout<<"xPos="<<xPos<<" yPos="<<yPos;
Move(UserMove);
     
}




};

//You can modify and change main()
int main()
{