Skip to content

refactor: group score together#946

Merged
Disservin merged 3 commits intomasterfrom
group-score
Nov 21, 2025
Merged

refactor: group score together#946
Disservin merged 3 commits intomasterfrom
group-score

Conversation

@Disservin
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the score handling mechanism by grouping the score value and its type (CP, MATE, or ERR) into a single Score struct. This improves the API design by reducing parameter count and ensuring that score values and their types are always handled together as a cohesive unit.

Key changes:

  • Introduced engine::Score struct containing type and value fields
  • Removed UciEngine::lastScoreType() method and updated UciEngine::lastScore() to return a Score struct
  • Updated DrawTracker::update() and ResignTracker::update() to accept a single Score parameter instead of separate score and type parameters

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
app/src/engine/uci_engine.hpp Defines new Score struct and updates lastScore() method signature to return Score instead of int64_t
app/src/engine/uci_engine.cpp Implements updated lastScore() method that returns Score struct and removes deprecated lastScoreType() method
app/src/matchmaking/match/match.hpp Updates DrawTracker and ResignTracker classes to accept const engine::Score& parameter
app/src/matchmaking/match/match.cpp Updates all call sites to use the new Score struct API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Disservin Disservin merged commit 1eedf82 into master Nov 21, 2025
18 checks passed
@Disservin Disservin deleted the group-score branch November 21, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants