My boss told me to pick up a ruby book and start figuring, so he gave me this assignment to write a small game:
He sent me an email with:
> construct an array of cars,
> accept entry of two cars,
> race the two cars,
> determine and display a winner
> #each car is [name, horsepower, weight] cars = [
> ['mustang', 300, 3480 ],
> ['camaro', 400, 3780 ],
> ['s2000', 237, 2864 ],
> ['350z', 287, 3288 ]
> run it giving two car names on the command line, example:
> ruby race.rb mustang camaro
> Use ARGV as the name of the first car, and ARGV as the name of
> the second car, as follows:
> name1 = ARGV || 'mustang'
> name2 = ARGV || 'camaro'
> Locate both cars in the array, compare their performance numbers, and
> pick a winner.
So how on earth do i do this???? Please help!!