summaryrefslogtreecommitdiff
path: root/grid.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-28 15:34:55 -0500
committerJeff Carr <[email protected]>2023-04-28 15:34:55 -0500
commit52b197ebf33192eaeda64bbd4acb2e283a45b097 (patch)
treef85eba4b5dca788395102f3b7a9ceadf7cb206d0 /grid.go
parent923f7721cca66d84dea77ffd9640d793803142ee (diff)
code cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'grid.go')
-rw-r--r--grid.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/grid.go b/grid.go
index 3fb1b71..9bcc105 100644
--- a/grid.go
+++ b/grid.go
@@ -37,7 +37,30 @@ func (n *Node) NewGrid(name string, w int, h int) *Node {
newNode.Y = h
newNode.NextX = 1
newNode.NextY = 1
+
+ /*
+ // fix values here if they are invalid. Index starts at 1
+ if (where.NextX < 1) {
+ where.NextX = 1
+ }
+ if (where.NextY < 1) {
+ where.NextY = 1
+ }
+ //
+ a.X = where.NextX
+ a.Y = where.NextY
+ */
+
newaction(&a, newNode, n)
+ /*
+ where.NextY += 1
+ if (where.NextY > where.Y) {
+ where.NextX += 1
+ where.NextY = 1
+ }
+ log(logInfo, "Action() END size (X,Y)", where.X, where.Y, "put next thing at (X,Y) =", where.NextX, where.NextY)
+ */
+
return newNode
}