GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free:

Verified Commit f07478f7 authored by Carmen Bianca Bakker's avatar Carmen Bianca Bakker
Browse files

Reduce calls to Move.san in castling moves

parent a10a6c93
Pipeline #20148050 passed with stages
in 10 minutes and 52 seconds
......@@ -363,6 +363,11 @@ class Move(namedtuple(
piece, file, rank, destination, promotion = match.groups()
for move in ruleset.moves(position):
if castling and not any(
flag in move.flags for flag in (
if strict or castling:
move_san = move.san(position, ruleset)
if not strict:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment