Timeline for Board not being drawn correctly Game of Fifteen
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 19, 2016 at 4:58 | comment | added | Timmy Tran | Urgh can't believe I couldn't see that on my own. Thank you for your time, great help. | |
Mar 19, 2016 at 4:57 | vote | accept | Timmy Tran | ||
Mar 19, 2016 at 3:12 | comment | added | Cliff B | OK, so assuming your init is working (my IDE is down, can't test), you just need to clean up your draw(). You need to alter your printf() statements a bit to add some spaces between numbers, some formatting so that all the numbers print with the same width, and add a line feed after each row. | |
Mar 19, 2016 at 3:05 | comment | added | Timmy Tran | Done I just forgot to updated it. I'm just stressed out sry. | |
Mar 19, 2016 at 1:20 | comment | added | Cliff B | Init() still has the same basic problems that you started with. The board array has to be initialized for every element. That means that i and j both have to start at 0. You are starting them at d-1. The result is that the code will make exactly one pass through each loop. | |
Mar 19, 2016 at 1:11 | comment | added | Timmy Tran | Question updated. | |
Mar 18, 2016 at 17:00 | comment | added | Cliff B | Again, confused. The order that you gave for the tiles (left to right, top to bottom), is correct. Exactly what is not initializing correctly? Please edit your question and add examples and description. Is it that the board isn't initializing correctly, or isn't being drawn correctly? | |
Mar 18, 2016 at 15:26 | comment | added | Timmy Tran | Does not, my apologies. | |
Mar 18, 2016 at 5:45 | comment | added | Cliff B | I'm confused. If the board does initialize correctly, then why is it a problem? And if that isn't the problem, what is? | |
Mar 18, 2016 at 5:40 | comment | added | Timmy Tran | My apologies, I've set i and j to 0. My problem is that the board does initialize correctly. When I run ./fifteen 4 I get 151413121110987654312 and ./fifteen 3, 87654321. | |
Mar 18, 2016 at 4:49 | history | answered | Cliff B | CC BY-SA 3.0 |