Netlogo code translation