{ 10_epd.pas -- Extended Position Description (EPD) output.
  Pascal translation of ../examples/10_epd.c.

  Functions demonstrated:
    SANEPDGenBasicCurrent() -- EPD string for the current position
    SANEPDGenBasic()        -- EPD string for an arbitrary board,
                               active color, castling rights, and
                               en passant square, without touching
                               the current game state }

program epd;

uses
  SanKit;

begin
  SANInit;

  WriteLn('Current position:');
  WriteLn('  FEN: ', SANFENGen);
  WriteLn('  EPD: ', SANEPDGenBasicCurrent);

  { SANEPDGenBasic() takes an explicit board/color/castling/en
    passant, so it can describe a position other than the live
    "current" one, e.g. one built by a caller for a test suite.
    "@gb" -- sankit.pas's own opaque placeholder for the board --
    is the only board this unit has any way to refer to, so it's
    the live one here too. }
  WriteLn;
  WriteLn('Same data, generated explicitly via SANEPDGenBasic():');
  WriteLn('  EPD: ', SANEPDGenBasic(@gb, curr_e.e_actc, curr_e.e_cast,
                                     curr_e.e_epsq));
end.
