summaryrefslogtreecommitdiff
path: root/src/wall.ml
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2022-11-07 03:31:07 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2022-11-07 03:31:07 +1300
commit525863904e8cb1ce62bbbf407262e5305d6bbc6f (patch)
tree68c9cfa61a8d807a08be92a328f27412bfdb3abb /src/wall.ml
parent95ebd2d6acfa744c5e93287cc6385f4f1359376e (diff)
visualwall now fully working
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 =