lib/bioshogi/board/kakinoki_formatter.rb in bioshogi-0.0.14 vs lib/bioshogi/board/kakinoki_formatter.rb in bioshogi-0.0.15

- old
+ new

@@ -25,24 +25,24 @@ end private def header - " " + Dimension::PlaceX.dimension.times.collect { |i| Dimension::PlaceX.fetch(i).name }.join(" ") + " " + Dimension::Column.dimension_size.times.collect { |i| Dimension::Column.fetch(i).name }.join(" ") end def line - "+" + "---" * Dimension::PlaceX.dimension + "+" + "+" + "---" * Dimension::Column.dimension_size + "+" end def rows - Dimension::PlaceY.dimension.times.collect do |y| - fields = Dimension::PlaceX.dimension.times.collect do |x| + Dimension::Row.dimension_size.times.collect do |y| + fields = Dimension::Column.dimension_size.times.collect do |x| place = Place.fetch([x, y]) soldier = @board.surface[place] cell_str(soldier) end - "|" + fields.join + "|" + Dimension::PlaceY.fetch(y).name + "|" + fields.join + "|" + Dimension::Row.fetch(y).name end end def cell_str(object) if object