Sashite::Cpn
Export in to the CPN format.
Installation
Add this line to your application's Gemfile:
gem 'sashite-cpn'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sashite-cpn
Usage
Sashite::Cpn.generate(false, [8, 8], ['w:r', 'w:n', 'w:b', 'w:q', 'w:^k', 'w:b', 'w:n', 'w:r',
'w:p', 'w:p', 'w:p', 'w:p', 'w:p', 'w:p', 'w:p', 'w:p',
nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil,
'W:P', 'W:P', 'W:P', 'W:P', 'W:P', 'W:P', 'W:P', 'W:P',
'W:R', 'W:N', 'W:B', 'W:Q', 'W:^K', 'W:B', 'W:N', 'W:R'], [])
# => 'B--8,8--w:r,w:n,w:b,w:q,w:^k,w:b,w:n,w:r,w:p,w:p,w:p,w:p,w:p,w:p,w:p,w:p,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,W:P,W:P,W:P,W:P,W:P,W:P,W:P,W:P,W:R,W:N,W:B,W:Q,W:^K,W:B,W:N,W:R--'
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/sashite/cpn.rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Versioning
Sashite::Cpn follows Semantic Versioning 2.0.
License
See LICENSE.md
file.