remove TODO comments

This commit is contained in:
Nico 2020-12-11 14:12:18 +00:00
parent 3c92d75853
commit 31d8d320f6
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ func occupied(gr *Grid, row, col, rstep, cstep int) bool {
for !done {
r += rstep
c += cstep
if r < 0 || r+1 > len(g) || c < 0 || c+1 > len(g[0]) { // never getting hit!
if r < 0 || r+1 > len(g) || c < 0 || c+1 > len(g[0]) {
return false
} else if g[r][c] == '#' {
return true
@ -68,12 +68,12 @@ func main() {
generations := 0
seats := 0 // number of occupied seats
stable := false
for !stable { // TODO break this loop when we're stable!
for !stable {
seats = 0
var newgrid Grid
for row, i := range grid {
var r []rune
for col, char := range i { // TODO fix application of rules
for col, char := range i {
if char == '.' {
r = append(r, '.') // floor, floor never changes
} else {