From 5e22924053c658b4561ac3a26274af5ba64d6d1f Mon Sep 17 00:00:00 2001 From: LQ63 Date: Tue, 31 Mar 2026 23:28:22 +0200 Subject: [PATCH] fix: replace .get with pattern match in FenExporterTest halfMoveClock round-trip --- .../scala/de/nowchess/chess/notation/FenExporterTest.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/scala/de/nowchess/chess/notation/FenExporterTest.scala b/modules/core/src/test/scala/de/nowchess/chess/notation/FenExporterTest.scala index 8a25d2c..6734b15 100644 --- a/modules/core/src/test/scala/de/nowchess/chess/notation/FenExporterTest.scala +++ b/modules/core/src/test/scala/de/nowchess/chess/notation/FenExporterTest.scala @@ -83,5 +83,6 @@ class FenExporterTest extends AnyFunSuite with Matchers: status = GameStatus.InProgress ) val fen = FenExporter.gameStateToFen(gameState) - val parsed = FenParser.parseFen(fen).get - parsed.halfMoveClock shouldBe 42 + FenParser.parseFen(fen) match + case Some(gs) => gs.halfMoveClock shouldBe 42 + case None => fail("FEN parsing failed")