BHG, who writes thats programs to you?!

**Low score in programming**! You cannot solve the very simple task of sorting and balancing queues. The developer who implemented such solutions should be ashamed!

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Sega
- Start date

BHG, who writes thats programs to you?!

BHG, this hint to help your programmers, the Ruby (programming language) code for the sorting algorithm is a uniform distribution into 3 queues (we can assume that these are barracks, and the distributed numbers are the recovery times) (although this code can still be optimized):

# make set of "recovery time of unit"'s

numbers = Array.new(50) { rand(1..10) }

# "barracks"

set1 = []

set2 = []

set3 = []

# === start of algorithm

numbers.sort!

sets = [set1, set2, set3]

while (num = numbers.pop)

# --- end of algorithm

puts "barrack 1: #{set1} ::: total time = #{set1.sum}"

puts "barrack 2: #{set2} ::: total time = #{set2.sum}"

puts "barrack 3: #{set3} ::: total time = #{set3.sum}"

This algorithm can be easily implemented in any other programming language. And now, BHG, think again about it -**who writes programs to you**?... either your programmers are lazy to the point of infinity, or they really understand very little about programming. Agree, **there is not a lot of code at all**, but your algorithm for distributing into queues (barracks) **still does not work correctly** in the game.

P.P.S. If your programmers are not able to “invent” even such a**very simple algorithm**, then don’t have to wonder why the game is full of all sorts of issues and bugs that have not been fixed for a long, long time.

# make set of "recovery time of unit"'s

numbers = Array.new(50) { rand(1..10) }

# "barracks"

set1 = []

set2 = []

set3 = []

# === start of algorithm

numbers.sort!

sets = [set1, set2, set3]

while (num = numbers.pop)

min_s = sets.min { | s1, s2 | (s1.sum + num) <=> (s2.sum + num) }

min_s << num

end# --- end of algorithm

puts "barrack 1: #{set1} ::: total time = #{set1.sum}"

puts "barrack 2: #{set2} ::: total time = #{set2.sum}"

puts "barrack 3: #{set3} ::: total time = #{set3.sum}"

This algorithm can be easily implemented in any other programming language. And now, BHG, think again about it -

P.P.S. If your programmers are not able to “invent” even such a

Last edited:

- Joined
- Oct 22, 2017

- Messages
- 890

- Joined
- Jan 23, 2019

- Messages
- 18

Now most recent update supposedly fixed it, but castles won’t permit generals assignments still, so I don’t know if the changes took.

Cynical me guesses they couldn’t fix programming so they made total workaround instead… but still not working on my end Fully.

The "made total workaround instead" is very well noted - they don't understand the program of the game at all, so they try to "solve" it in some workaround way.

Now most recent update supposedly fixed it, but castles won’t permit generals assignments still, so I don’t know if the changes took.

Cynical me guesses they couldn’t fix programming so they made total workaround instead… but still not working on my end Fully.