about summary refs log tree commit diff stats
path: root/js/baba-yaga/scratch/baba/test_io_print.baba
blob: 462308974759b4758800d67e2e74f56be54f3174 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Test the new io.print functionality

// Simple grid for testing
testGrid : [
  [1, 0, 1],
  [0, 1, 0],
  [1, 0, 1]
];

// Test basic grid printing
io.print "Testing io.print with automatic grid detection:";
io.print testGrid;

io.print "";
io.print "Testing explicit grid format:";
io.print "grid" testGrid;

io.print "";
io.print "Testing regular data:";
io.print "Number" 42;
io.print "String" "Hello World";

// Test with a larger grid (like from Game of Life)
glider : [
  [0, 1, 0, 0, 0],
  [0, 0, 1, 0, 0],
  [1, 1, 1, 0, 0],
  [0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0]
];

io.print "";
io.print "Conway's Game of Life - Glider Pattern:";
io.print glider;