lib/jkf/parser/kif.rb
def transform_teban_fugou_from(teban, fugou, from)
        ret = { 'color' => teban2color(teban.join), 'piece' => fugou['piece'] }
        if fugou['to']
          ret['to'] = fugou['to']
        else
          ret['same'] = true
        end
        ret['promote'] = true if fugou['promote']
        ret['from'] = from if from
        ret
      end
# transform teban-fugou-from to jkf
transform teban-fugou-from to jkf
transform teban - fugou - from to jkf
def transform_teban_fugou_from(teban, fugou, from)
        ret = { 'color' => teban2color(teban.join), 'piece' => fugou['piece'] }
        if fugou['to']
          ret['to'] = fugou['to']
        else
          ret['same'] = true
        end
        ret['promote'] = true if fugou['promote']
        ret['from'] = from if from
        ret
      end
def transform_teban_fugou_from ( teban , fugou , from ) ret = { 'color' => teban2color ( teban . join ) , 'piece' => fugou [ 'piece' ] } if fugou [ 'to' ] ret [ 'to' ] = fugou [ 'to' ] else ret [ 'same' ] = true end ret [ 'promote' ] = true if fugou [ 'promote' ] ret [ 'from' ] = from if from ret end
transform teban-fugou-from to jkf
transform teban - fugou - from to jkf
teban
fugou
from