Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. if (amount != 0) {
  2. for (int i=0; i<Math.abs(amount); i++) {
  3. playerPosition+=Integer.signum(amount);
  4. playerPosition = Math.floorMod(playerPosition, squareList.size());
  5. if (i != Math.abs(amount) - 1) {
  6. squareList.get(playerPosition).onPassed();
  7. }
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement