Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void move(int direction, int amount){
- for(int i = 0; i<amount; i++){
- if(direction == 0 && !collision(direction))
- x --;
- else if(direction == 1 && !collision(direction))
- x ++;
- else if(direction == 2 && !collision(direction))
- y --;
- else if (direction ==3 && !collision(direction))
- y++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement