X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=Position.pm;fp=Position.pm;h=90e7c1ccc07f649d66b081cb8e01f0a33cb70622;hp=6b772a67b82fafe4bcffb5b44a09849a8fb49eeb;hb=2e02751eebe4f5ed406e0f61c6f6eadae0193a41;hpb=f14762ad5ddf5881777f5861b19960784d224c71 diff --git a/Position.pm b/Position.pm index 6b772a6..90e7c1c 100644 --- a/Position.pm +++ b/Position.pm @@ -127,6 +127,11 @@ sub parse_pretty_move { return $pos->{'board'}->parse_pretty_move($move, $pos->{'toplay'}); } +sub num_pieces { + my ($pos) = @_; + return $pos->{'board'}->num_pieces(); +} + # Returns a new Position object. sub make_move { my ($pos, $from_row, $from_col, $to_row, $to_col, $promo) = @_;