Following is a demo of the leftwall.pl program.
phurd@phurd-X510UAR:~/Desktop/COG366WorkSite/prolog$ swipl Welcome to SWI-Prolog (threaded, 64 bits, version 8.4.0) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit https://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). ?- [leftwall]. true. ?- solve(X). X = [[2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [5, 3], [5, 2], [5|...], [...|...]|...] [write] X = [[2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [5, 3], [5, 2], [5, 2], [5, 3], [5, 4], [5, 5], [5, 5], [5, 4], [5, 3], [4, 3], [3, 3], [3, 4], [3, 5], [2, 5], [2, 6]]