Count iterations when done

This commit is contained in:
Kistaro Windrider 2024-02-05 18:48:34 -08:00
parent 5bbf188285
commit 281cb218b3
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -9,7 +9,7 @@ import (
"math/rand"
)
var edgeSize = flag.Int("n", 8, "Cells per side")
var edgeSize = flag.Int("n", 15, "Cells per side")
type scanState int
const (
@ -39,10 +39,8 @@ func main() {
evals = append(evals, make([]fuckness, *edgeSize))
}
dump(board, evals, "Starting position")
iterations := uint64(0)
scream := uint64(1)
scream := uint64(0)
for(isStillFucked(board, evals)) {
if iterations >= scream {
dump(board, evals, fmt.Sprint("Iteration ", iterations))
@ -52,7 +50,7 @@ func main() {
fuckUp(board, evals)
}
dump(board, evals, "Not a single fuck")
dump(board, evals, fmt.Sprintf("Not a single fuck (%d iterations)", iterations))
}
func onBoard(i, j int) bool {