Days 1-2Progress got off to a flying start and i was making excellent headway until a few uncrushable bugs started to work their way in.
Finally i got to a point where it was much easier to just ditch the offending objects and recode them. Many hours latter and i was still running into the same bugs of tiles not being rotated correctly, sometimes. Eventually the offender was tracked down, it turned out to be one of the first functions i had written, a simple little function to cycle a list forwards or backwards, and it only worked going forwards.
tlist = tlist[:]
for x in range(abs(direction)):
if direction > 0:
So the tiny mistake of forgetting to pass 0 to pop cost me about 6 hours of programming time. Complaining aside it works now and can generate a full 9x9 board. I have added weighting so some tiles are more likely to be chosen than others to try and generate a less erratic board but if i have time i would like to add some heuristics to try and make it favor forming larger cities over many small ones.
By tomorrow i hope to have unused tiles sitting in a tray on the right (scaled down) and be able to drag and drop them around on the grid, and if i am going really well hopefully a good start on the scoring code too.
I have also managed to rope in a friend to attempt drawing up some nicer tiles for me.
I commend you if you have read this far though the haze of poor spelling and grammar.
(log in to comment)