Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x = 1;
- int y = 1;
- if keyRight
- {
- x= x+1; // move right one number
- }
- if keyLeft
- {
- x= x-1; // move left one number
- }
- if keyUp
- {
- y= y-3; // move upt three numbers
- }
- if keyDown
- {
- y= y+3;// move down three number
- }
- if (x = -2)
- x = 9;
- if (x = 10)
- x = 1
- if (y >= 10)
- y = 1;
- if (y <= -1)
- y = 9;
- cout << inventory << "/n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement