Skip to content

Changes to move format conversion #20

@divy-07

Description

@divy-07

How we parse moves and make moves currently is very isolated, this can be made drastically simpler and integrated into the main architecture.

Currently, when we get the position command from UCI, we get "position [fen/startpos] [moves]" we do:

  1. parse the given fen or "startpos" to make a new Position object
  2. apply moves one by one using MoveConversion.applyAlgebraMoves(), which returns a Position object after moves were applied
  3. this position is stored in the engine field

What would be better is:

  1. same as step 1 above
  2. convert all the given moves into Move objects (implement Move.fromAlgebraicNotation())
  3. Use Position.makeMove() to update the position

This approach moves away from using static isolated methods, designed only for this task and uses more general and tested methods.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions