A simple "peg board" game, created by drawing circles on a canvas, and some significant logic!
AIA
pegSolitaire.aia (16.1 KB)
Enjoy ![]()
A simple "peg board" game, created by drawing circles on a canvas, and some significant logic!
AIA
pegSolitaire.aia (16.1 KB)
Enjoy ![]()
Nice ![]()
Drat! ![]()
I had been thinking about doing one of those in the next week or so…
I guess great minds (?) think alike.
— tom
There's plenty of room for improvement here.
You could abstract out the pixel counting into row and column number logic.
You could add an Undo/ Redo stack.
You could cut out the copy paste fat.
You could add a data structure that represents peg/hole occupancy, to support future move tree search.
You could extend the puzzle into 3 dimensions, as a lattice.
You could try the matrix as a data type for point displacement representation, using matrix addition and scalar matrix multiplication .