Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
def inner_move(delta, move_dir):
if abs(delta) > ws // 2:
> delta -= (delta / abs(delta)) * ws
for i in range(0, delta, delta / abs(delta)):
move(move_dir[delta / abs(delta)])
Basically, if it is not a 9, harvest it, if it is a 9, move on. Fill in the whole field that way, and then harvest.
Chews through carrots like MAD, but it works.
So to do it one time ->
final_gnome_sort(plant_cacti_field(get_world_size()**2))
This follows what is going on as plant_cacti_field takes 1 argument which is the total number of positions you would like to plant and in a max sized field's case it would be 100 or world size squared.
Then we pass the board which is returned from plant_cacti_field to the gnome sorting function and it will do what needs to be done at that point.
Also, as I stated before I have no idea what or how another performs there code and this guide isn't a copy pasta it all solution though the code provided does work and is as effective as stated.
As long as a 1-D array with the cacti values is passed in the function will sort.
or excluding to this, how should the main loop look like then?
naming of this code dosnt matter?
I can, I will append a section for that.
cause its very confusing with these plenty code snippets here. thanks
I have directly copy pasta'd this code into the a new save as well and it runs as described,
In addition the fact that you are seeing it moving but not functioning properly leads me to believe that there is something going on in how you copied it over and have code in the background that is messing with the code I provided. I cannot do anything about that particular and this guide is just a run down on how to implement an exchange type sort which in this case is the gnome sort.