Draft: Create first public API with libmuttum 1.0.0
To create a better usable public API, we create more objects.
I still want to improve this merge with:
- MuttumLetter:
-
Update from struct to GObject with grapheme and state public properties -
Create a copy function (GObject style) -
Create init function with useful default values (state) -
Create a derived type MuttumAttemptLetter with known-grapheme property -
Create a derived type MuttumAlphabetLetter with found-count property
-
- MuttumAttempt:
-
Create a copy function -
Correctly free sub-objects -
Add construct-only readable "n-letters" property -
Improve foreach function signatures (GFunc is too generic)
-
- MuttumBoard:
-
Create a copy function -
Correctly free sub-objects -
Improve foreach function signatures (GFunc is too generic)
-
- MuttumAlphabet:
-
Creates this GObject like the MuttumAttempt (list of MuttumAlphabetLetter with all possible grapheme in current language) -
Create a foreach function to go through all letters -
Have a way to know the total number of letters
-
- MuttumEngine:
-
Use GObject properties to construct (n-attemps, min-word-size, max-word-size, dictionary) and to access read-only state (current-attempt-number) -
Create MuttumDictionary and give it as parameter to MuttumEngine (this will allow to let client to configure the engine) + Remove dictionnary from MuttumEngine class members
-