Movement effeciency critique
Hi all!
New to the game and to writing code really.
Wanted to ask for a critique on this function getgrass(smooth)
while(True):
`for i in range(get_world_size() -1):`
`if can_harvest():`
`harvest()`
`move(East)`
`if can_harvest():`
`harvest()`
`move(North)`
`for i in range(get_world_size() -1):`
`if can_harvest():`
`harvest()`
`move(West)`
`if can_harvest():`
`harvest()`
`move(North)`
basically my original getgrass function was waisting time flying back to the first column each time so now it snakes up left to right.
but can it be written smoother / shorter?
Posted Jan 14, 2026, 12:07 AM UTC
35