8
« on: February 15, 2016, 03:50:56 pm »
Thanks for your reply.
Yes but I don't really want to have a 2D list- it just needs to be processed from top to bottom- 2D list extension requires choose the size before you start so it would possibly enormous (another solution for a normal list involves an enormous list) and doesn't have any means to simply go from the top left item and right then to the first on the next row with neat code. Each item will have a new index and the absolute position doesn't matter only the relative position. My latest thought is this have a primary List1 and a secondary List2 that has elements from 0 to 8 which represents the row numbers of the spaces available. You can set items in List1 to the associated number of the row - if that row has a value then you insert the item at that row and then take List2 and increment each item at row number below the current to the last item.
i.e. Following my original example ( the item may not be added in any order)
Updates of List attributes
List1: (-,-,X,-,-,-,-,-,-)
List1: (-,-,X,Y,-,-,-,-,-)
List1 (-,-,X,Y,Z,-,-,-,-,-)
List2 (0,1,2,3,4,6,7,8,9)
and so on. If you can think of simpler code - it would be much appreciated.