From 4b5af8da20f2e35e6cd81a4e7418767e6964e8bc Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 20 Jan 2019 10:27:10 -0500 Subject: solve: check for corners --- src/core/sok-solve.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core/sok-solve.c') diff --git a/src/core/sok-solve.c b/src/core/sok-solve.c index 45d227c..0d4e500 100644 --- a/src/core/sok-solve.c +++ b/src/core/sok-solve.c @@ -36,13 +36,12 @@ sok_solve_step( // return failure return false; } -/* - * // make sure level is solvable - * if (sok_ctx_is_lost(ctx)) { - * // return failure - * return false; - * } - */ + + // make sure level is solvable + if (sok_ctx_is_lost(ctx)) { + // return failure + return false; + } for (size_t dir = 0; dir < SOK_DIR_LAST; dir++) { if (!sok_ctx_move(ctx, dir)) { -- cgit v1.2.3