Original Post
Hey, just having a nightmare working out how to achieve something that i am sure is possible, figured you guys might have some ideas. Basically i am reading in a file and storing each character inside a Queue data structure. Then i decided i needed to be able to fill my game grid with all these values one by one. But instead of using a straightforward 2d array i am using a 2d array filled with classes that i call subGrids. Each of these subGrids has another 2d array inside it. Cant seem to be able to move between the right grids and columns ad rows to fill all of it in. At the moment i am trying using nested for loops but cant seem to get it right. e.g: This is how the overall grid looks with the number showing the different subGrids. --- --- --- --- --- --- --- --- --- | 1 | 1 | 1 | 2 | 2 | 2 | 3 | 3 | 3 | --- --- --- --- --- --- --- --- --- | 1 | 1 | 1 | 2 | 2 | 2 | 3 | 3 | 3 | --- --- --- --- --- --- --- --- --- | 1 | 1 | 1 | 2 | 2 | 2 | 3 | 3 | 3 | --- --- --- --- --- --- --- --- --- | 4 | 4 | 4 | 5 | 5 | 5 | 6 | 6 | 6 | --- --- --- --- --- --- --- --- --- | 4 | 4 | 4 | 5 | 5 | 5 | 6 | 6 | 6 | --- --- --- --- --- --- --- --- --- | 4 | 4 | 4 | 5 | 5 | 5 | 6 | 6 | 6 | --- --- --- --- --- --- --- --- --- Then the Queue holds for example: 0040090010605306400450002015 etc Any help greatly appreciated. Thanks