yojimbos_law

mafia turns spent printing CLI command

Jun 7th, 2018
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. ash foreach i in $locations[] if(i.turns_spent > 0) print(i + ": " + i.turns_spent);
  2.  
  3. or
  4.  
  5. ash int[location] turns;int best;foreach i in $locations[]{if(i.turns_spent > 0 ){turns[i] = i.turns_spent;if(turns[i] > best){best = turns[i];}}}for i from 0 to best{foreach j in turns{if(turns[j] < (best+1-i) && turns[j] >= (best-i)){print(j+": "+turns[j]);}}}
Advertisement
Add Comment
Please, Sign In to add comment