perl-based chess abstraction