Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. public void move() {
  2.         super.move();
  3.        
  4.         Location temp = getLocation();
  5.        
  6.         temp = head.getLocation();
  7.         int tmp = head.getSpeed();
  8.         int hehe = head.getHeading();
  9.         head.move();
  10.        
  11.        
  12.        
  13.         if(newSegCount > 0){
  14.        
  15.             list.add(new BodySegment(temp, tmp, hehe));
  16.             newSegCount--;
  17.         }
  18.         else{
  19.         list.get(0).setLocation(temp);
  20.         list.get(0).setSpeed(tmp);
  21.         list.get(0).setHeading(hehe);
  22.         list.add(list.remove(0));
  23.            
  24.         }
  25.        
  26.        
  27.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement