{ 08_material_count.pas -- material counting (and a note on
  evaluation). Pascal translation of ../examples/08_material_count.c.

  Functions demonstrated:
    SANSetMaterial() -- recompute cpmv[c_w]/cpmv[c_b], the total
                        piece value currently on the board for each
                        color
    SANPosEval()      -- "positional factors" evaluation

  Honesty note: SANPosEval() is a stub in the original 1994 SAN Kit
  source (sanpos.c literally says "routine under construction" and
  always returns 0). Material counting via SANSetMaterial()/cpmv[]
  is the only scoring the stock kit actually provides. }

program material_count;

uses
  SanKit;

begin
  SANInit;

  SANFENSet(
    'r1bqkbnr/pppp1ppp/2n5/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2 3');

  SANSetMaterial;
  WriteLn('Position: ', SANFENGen);
  WriteLn('White material: ', cpmv[c_w]);
  WriteLn('Black material: ', cpmv[c_b]);

  WriteLn('SANPosEval(): ', SANPosEval,
          ' (always 0 -- unimplemented in this kit)');
end.
