Skip to content

Conversation

@yafred
Copy link
Contributor

@yafred yafred commented Feb 12, 2025

fixes #16951

@yafred yafred marked this pull request as ready for review February 12, 2025 04:12
val status = parsed.tags(_.Termination).map(_.toLowerCase) match
case Some("normal") => game.situation.status | Status.Resign
case Some("normal") =>
game.situation.status | (if parsed.tags(_.Result).getOrElse("") === "1/2-1/2" then Status.Draw
Copy link
Collaborator

Choose a reason for hiding this comment

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

.getOrElse("") === "1/2-1/2" == .contains("1/2-1/2")

Copy link
Collaborator

@ornicar ornicar Feb 12, 2025

Choose a reason for hiding this comment

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

also this is not the place to hardcode the draw notation, scalachess has parsers and they account for many other draw notations such as ½-½ or 0.5-0.5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean that the issue is that game.situation.status should be Status.Draw and that should be fixed in scalachess ?

@ornicar ornicar merged commit aefd92b into lichess-org:master Feb 12, 2025
3 checks passed
@yafred yafred deleted the issue-16951 branch February 12, 2025 10:49
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.

Imported drawn game shows resignation as result

2 participants