module Shogi::Format::USI::Cell

Constants

USI_VERTICAL_LABELS

Public Instance Methods

piece_usi() click to toggle source
# File lib/shogi/format/usi/cell.rb, line 21
def piece_usi
  if @piece
    if @turn
      @piece.usi
    else
      @piece.usi.downcase
    end
  else
    1
  end
end
place_usi() click to toggle source
# File lib/shogi/format/usi/cell.rb, line 17
def place_usi
  "#{x}#{USI_VERTICAL_LABELS[y]}"
end