jonnycomes / look_and_say

A python module for exploring look and say sequences in the spirit of John H Conway.
https://jonnycomes.github.io/look_and_say/
MIT License
1 stars 0 forks source link

Refactor SplittingStrategy #1

Closed jonnycomes closed 2 years ago

jonnycomes commented 2 years ago

Currently the SplittingStrategy class constructor is not usable in the most common (maybe all?) situations. It would be better to have a constructor which initiates the splitting function to do no splitting, and then have some sort of method that allows for adding a splitting condition based on Left and Right pairs.

jonnycomes commented 2 years ago

Done. The Chemistry constructor now takes a split function instead of a splitting strategy. The SplittingStrategy has been removed completely. There is a new SplittingFactory which will be responsible for all the good that was lost with SplittingStrategy.