summaryrefslogtreecommitdiff
path: root/src/wall.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/wall.ml')
-rw-r--r--src/wall.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wall.ml b/src/wall.ml
index 94043dc..6c11939 100644
--- a/src/wall.ml
+++ b/src/wall.ml
@@ -22,6 +22,7 @@ module type S =
sig
type element
type wall
+ val empty : wall
val create : dimx:int -> dimy:int -> init:element array -> wall
val x_length : wall -> int
val y_length : wall -> int
@@ -281,6 +282,11 @@ module Make (A : Algebra) =
with Exit ->
result
+ (* The empty wall isn't truly empty because every wall has *)
+ (* a row of ones at the very top, regardless of the input sequence. *)
+ let empty =
+ Array.make_matrix 1 1 (Some A.one)
+
let get wall ~x ~y =