refactor: NCS-22 NCS-23 reworked modules and tests #17
@@ -45,11 +45,7 @@ object PgnParser:
|
|||||||
}
|
}
|
||||||
errors match
|
errors match
|
||||||
case Some(err) => Left(err)
|
case Some(err) => Left(err)
|
||||||
case None =>
|
case None => Right(finalCtx)
|
||||||
if finalCtx.moves.isEmpty && game.moves.nonEmpty then
|
|
||||||
Left("No moves were parsed from the PGN")
|
|
||||||
else
|
|
||||||
Right(finalCtx)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Parse a complete PGN text into a PgnGame with headers and moves.
|
/** Parse a complete PGN text into a PgnGame with headers and moves.
|
||||||
|
|||||||
Reference in New Issue
Block a user