lib/game_boards/board_utils/hex_board_utils.rb
# Increases the row position of odd columns by 0.5
Increases the row position of odd columns by 0.5
Increases the row position of odd columns by 0 . 5
def hex_shift(position)
      if position[1] % 2 == 0
        return position
      else
        return [position[0] + 0.5, position[1]]
      end
    end
def hex_shift ( position ) if position [ 1 ] % 2 == 0 return position else return [ position [ 0 ] + 0.5 , position [ 1 ] ] end end
Increases the row position of odd columns by 0.5
Increases the row position of odd columns by 0 . 5
position
<not_specific>