Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. String direction = Comp.getDirection();
  2. if(direction == "North") {
  3. Comp.incPosY();
  4. } else if(direction == "East") {
  5. Comp.incPosX();
  6. } else if(direction == "South") {
  7. Comp.decPosY();
  8. } else if(direction == "West") {
  9. Comp.decPosX();
  10. } else {
  11. //Do nothing, something went wrong with direction
  12. }
  13. Map.update(Comp.pos_x, Comp.pos_y, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement