With this module is possible call the method to_utf8
on a
string. This method convert the chess piece identifier character into UTF8
chess character, for example:
:001 > require 'chess/utf8_notation'
=> true
:002 > 'Qf7#'.to_utf8
=> '♕f7#'
To use this utility explicit require is needed: require
'chess/utf8_notation'
Methods
- T
Constants
UTF8_MAP | = | { 'P' => '♙', 'R' => '♖', 'N' => '♘', 'B' => '♗', 'Q' => '♕', 'K' => '♔', 'p' => '♟', 'r' => '♜', 'n' => '♞', 'b' => '♝', 'q' => '♛', 'k' => '♚' } |
Map a piece identifier character with the corresponding UTF8 chess character |
Instance Public methods