Skip to content

Instantly share code, notes, and snippets.

@fvaletk
fvaletk / ant_game.rb
Last active March 1, 2021 22:37
Ant Game
# Ant Game
#
# Board
# w w w w w
# w w w w w
# w w w w w
# w w w w w
# w w w w w
def ant_game(map_size, moves)
require 'HTTParty'
require 'Nokogiri'
require 'Pry'
@image_base_url = 'http://zoom.jcpenney.com/is/image/'
@image_medium = '?wid=640&hei=640&op_usm=.4,.8,0,0&resmode=sharp2&op_usm=1.5,.8,0,0&resmode=sharp'
@image_small = '?wid=96&hei=96&op_usm=.4,.8,0,0&resmode=sharp2&op_usm=1.5,.8,0,0&resmode=sharp'
@image_large = '?wid=2000&hei=2000&op_usm=.4,.8,0,0&resmode=sharp2&op_usm=1.5,.8,0,0&resmode=sharp'
def price_to_float(price)