Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix Bug #1: Blank board
There are actually 2 bugs in this program: 1. We return from the function inside the first for-loop. This means that the function returns after a single pass through the loop, before we've had a chance to build up our full board. We fix this bug by moving the return statement outside of both loops. 2. We don't reset the `row` variable after each time through the first for-loop. This means that we keep adding to the same list, instead of splitting our adding between multiple different rows. We fix this bug by moving `row = []` inside the first for-loop so that we reset the row each time.
- Loading branch information