Eiktyrner, on 19 January 2014 - 03:49 AM, said:
Can you describe step by step how you end up in the situation so I can repeat it?
Thanks for the help, but managed to get it working
Posted 20 January 2014 - 11:57 AM
Posted 22 January 2014 - 01:52 AM
OneNonlyNova, on 20 January 2014 - 11:57 AM, said:
Posted 22 January 2014 - 11:58 AM
Eiktyrner, on 22 January 2014 - 01:52 AM, said:
OneNonlyNova, on 20 January 2014 - 11:57 AM, said:
Posted 22 January 2014 - 04:12 PM
Posted 31 January 2014 - 04:31 AM
Posted 31 January 2014 - 05:53 PM

Posted 31 January 2014 - 08:34 PM
Posted 03 February 2014 - 03:16 PM
Posted 04 February 2014 - 08:23 PM
CaseyRobinson, on 03 February 2014 - 03:16 PM, said:

Posted 05 February 2014 - 09:59 AM
Posted 06 February 2014 - 09:58 AM
Posted 06 February 2014 - 01:14 PM
Posted 06 February 2014 - 07:48 PM
Posted 06 February 2014 - 11:29 PM
Posted 07 February 2014 - 11:04 AM
Slackratchet, on 06 February 2014 - 11:29 PM, said:
Posted 07 February 2014 - 11:15 PM
Posted 08 March 2014 - 03:12 AM
McLeopold, on 22 January 2014 - 11:58 AM, said:
Eiktyrner, on 22 January 2014 - 01:52 AM, said:
OneNonlyNova, on 20 January 2014 - 11:57 AM, said:
Posted 11 March 2014 - 07:27 PM
huffy2404, on 06 February 2014 - 07:48 PM, said:
-- bubble sort drones
print("sorting drones...")
for i = 2, 16 do
if turtle.getItemCount(i) > 0 and droneData[i] then
droneData[i].score = scoreBee(princessData, droneData[i])
for j = i - 1, 2, -1 do
if droneData[j+1].score > droneData[j].score then
swapBee(j+1, j, freeSlot)
droneData[j+1], droneData[j] = droneData[j], droneData[j+1]
end
end
end
end
local highestScore
-- selection sort drones
logLine("sorting drones...")
for i = 2, 16 do
highestScore = i
if turtle.getItemCount(i) > 0 and droneData[i] then
droneData[i].score = scoreBee(princessData, droneData[i])
for j = i + 1, 16 do
if turtle.getItemCount(j) > 0 and droneData[j] then
if not droneData[j].score then
droneData[j].score = scoreBee(princessData, droneData[j])
end
if droneData[j].score > droneData[highestScore].score then
highestScore = j
end
end
end
-- swap bees
if highestScore ~= i then
swapBee(i, highestScore, freeSlot)
droneData[i], droneData[highestScore] = droneData[highestScore], droneData[i]
end
end
end
sl t species f spd n f c tmp hmd score --|-|-------|-|---|-|-|-|---|---|------ 1 P Ind:Ind 2 0.6 - - - - - 2 D Unw:Ind 2 0.6 - - - - - 4096 3 D Unw:Ind 2 0.6 - - - - - 4096 4 D Unw:Ind 2 0.6 - - - - - 4096 5 D Unw:Ind 2 0.6 - - - - - 4096 6 D Cul:Dil 2 0.6 - - - - - 4096 7 D Mea:Dil 2 0.6 - - - - - 4096 8 D Unw:Dil 2 1.2 - - - - - 4096 9 D Unw:Dil 2 0.6 - - - - - 4096 10 D Ind:Ind 2 0.6 - - - - - 4096 11 D Unw:Ind 2 0.6 - - - - - 4096 12 D Unw:Ind 2 0.6 - - - - - 4096
sl t species f spd n f c tmp hmd score --|-|-------|-|---|-|-|-|---|---|------ 1 P Ind:Ind 2 0.6 - - - - - 2 D Ind:Ind 2 0.6 - - - - - 128 3 D Unw:Ind 2 0.6 - - - - - 112 4 D Cul:Ind 2 0.6 - - - - - 100 5 D Unw:Cul 2 0.6 - - - - - 84 6 D Dil:Dil 2 0.6 - - - - - 80 7 D Cul:Dil 2 0.6 - - - - - 76 8 D Com:Dil 2 1.2 - - - - - 74
Edited by Zixxl, 12 March 2014 - 06:16 PM.
Posted 14 March 2014 - 05:59 PM
0 members, 1 guests, 0 anonymous users