Create a data table for use with the search touch search function.
Creates a table that stores the minimum number of steps needed to get from
rounds to a particular row.
Sixes (in Stedman) alternate between slow and quick and we can work around
this complexity by searching in steps of a "pair" of sixes, being a call, a
slow six, another call, and a quick six. Any row can be followed by any of
seven other rows.
We start from rounds itself which is (trivially) 0 steps from rounds.
We loop over the seven possible transpositions to generate seven new rows
that are each one step from rounds, writing the number of steps into the
table as we go. We then iterate over those seven new rows generating 49 rows
that are two steps from rounds and continue onwards until the table is full.
Create a data table for use with the search touch search function.
Creates a table that stores the minimum number of steps needed to get from rounds to a particular row.
Sixes (in Stedman) alternate between slow and quick and we can work around this complexity by searching in steps of a "pair" of sixes, being a call, a slow six, another call, and a quick six. Any row can be followed by any of seven other rows.
We start from rounds itself which is (trivially) 0 steps from rounds. We loop over the seven possible transpositions to generate seven new rows that are each one step from rounds, writing the number of steps into the table as we go. We then iterate over those seven new rows generating 49 rows that are two steps from rounds and continue onwards until the table is full.