shithub: puzzles

Download patch

ref: 0dd01866627e82ea21ed0e85021abdb070e0159c
parent: ecb3a9d6f219e95c694d7857f579c9ef2ebad064
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Jul 31 19:08:20 EDT 2023

Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Same Game

--- a/samegame.c
+++ b/samegame.c
@@ -1305,11 +1305,11 @@
 	tx = ui->xsel;
 	ty = ui->ysel;
     } else
-	return NULL;
+	return MOVE_UNUSED;
 
     if (tx < 0 || tx >= state->params.w || ty < 0 || ty >= state->params.h)
-	return NULL;
-    if (COL(state, tx, ty) == 0) return NULL;
+	return MOVE_UNUSED;
+    if (COL(state, tx, ty) == 0) return MOVE_NO_EFFECT;
 
     if (ISSEL(ui,tx,ty)) {
 	if (button == RIGHT_BUTTON || button == CURSOR_SELECT2)