Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better History System #68

Merged

Conversation

nicholasmello
Copy link
Contributor

@nicholasmello nicholasmello commented Apr 20, 2024

Better History System

Description

Rewriting the history system to not rely on strings so it will be easier to work with for other issues. Favors a struct instead of many string conversions until the moves actually have to be displayed.

This takes PR #64 a step further by getting rid of the option type and the string and replacing the tuple with a proper struct

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Ran through all cargo tests and played moves on the board to make sure the history still appeared correctly

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Rewriting the history system to not rely on strings so it will be easier
to work with for other issues. Favors a struct instead of many string
conversions until the moves actually have to be displayed.

Signed-off-by: Nick Mello <[email protected]>
@nicholasmello
Copy link
Contributor Author

Playing around some more, promotions aren't quite working right... I'll have to look into that

@nicholasmello
Copy link
Contributor Author

Fixed the promotions, going to wait to squash until the end because there might be more comments for stuff to change. Let me know what you think 😄

Copy link
Owner

@thomas-mauran thomas-mauran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice refactor gonna make it way easier to read 👏

@thomas-mauran thomas-mauran added the refactor Refactor of the code label Apr 24, 2024
@thomas-mauran thomas-mauran merged commit 6151e2d into thomas-mauran:main Apr 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants