shithub: puzzles

Download patch

ref: bef1b2c59b443a2778a01e6c167e29ee9670603a
parent: 3768ed65f281400f5fcdd6e2192e154a6661c0f8
author: Kevin Lyles <kevinlyles@gmail.com>
date: Sat May 9 17:05:18 EDT 2015

Mark some arguments constant

--- a/galaxies.c
+++ b/galaxies.c
@@ -152,8 +152,9 @@
 static int solver_state(game_state *state, int maxdiff);
 static int solver_obvious(game_state *state);
 static int solver_obvious_dot(game_state *state, space *dot);
-static space *space_opposite_dot(game_state *state, space *sp, space *dot);
-static space *tile_opposite(game_state *state, space *sp);
+static space *space_opposite_dot(const game_state *state, const space *sp,
+                                 const space *dot);
+static space *tile_opposite(const game_state *state, const space *sp);
 
 /* ----------------------------------------------------------
  * Game parameters and presets
@@ -552,7 +553,8 @@
 }
 #endif
 
-static space *space_opposite_dot(game_state *state, space *sp, space *dot)
+static space *space_opposite_dot(const game_state *state, const space *sp,
+                                 const space *dot)
 {
     int dx, dy, tx, ty;
     space *sp2;
@@ -568,7 +570,7 @@
     return sp2;
 }
 
-static space *tile_opposite(game_state *state, space *sp)
+static space *tile_opposite(const game_state *state, const space *sp)
 {
     space *dot;