Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String direction = Comp.getDirection();
- if(direction == "North") {
- Comp.incPosY();
- } else if(direction == "East") {
- Comp.incPosX();
- } else if(direction == "South") {
- Comp.decPosY();
- } else if(direction == "West") {
- Comp.decPosX();
- } else {
- //Do nothing, something went wrong with direction
- }
- Map.update(Comp.pos_x, Comp.pos_y, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement