Refactor app state and implement player selection (human vs. computer), piece promotion, game status, and resigning/draws #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a lot in this one, but I think that this gets everything into a good spot to move forward with actual strategies for the computer. Summary of the major changes:
AppStateand focus on interacting through its methods; it locks each sub-portion of state independently, so you don't get blocked by another portion of state being locked if you're not using itThis isn't the cleanest code, and there's a lot of work left to do. I'm not hugely motivated to clean it up soon because I want to move onto the engine side of this, and I also think I want to switch to fltk-rs since egui has been difficult in some instances where I have to imitate retained mode, and I've had a lot of trouble finding docs for what I am trying to do. I don't really have a coherent thought here but I think the options going forward are:
Right now I lean toward eventually adopting fltk-rs, but I'm going to take a break from GUI stuff after this lands for a while.