Skip to content

Commit

Permalink
Some more game implementation, look a method
Browse files Browse the repository at this point in the history
  • Loading branch information
ledewitt committed Feb 15, 2012
1 parent 03b994b commit e5d9a19
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions simple_game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,31 @@

#### METHODS ####

def describe_location(location map)

def describe_location(location)
p location[1]
end

#### MAIN BODY OF CODE ####

objects = ['WISKEY_BOTTLE', 'BUCKET', 'FROG', 'CHAIN']

LIVING_ROOM = ['You are in the LIVING_ROOM of a wizards house. There is a wizard snoring loudly on the couch.', 'WEST door garden', 'Upstairs stairway ATTIC']
LIVING_ROOM = ['LIVING_ROOM', 'You are in the LIVING_ROOM of a wizards house. There is a wizard snoring loudly on the couch.', 'WEST door garden', 'Upstairs stairway ATTIC']

GARDEN = ['You are in a beautiful GARDEN. There is a WELL in front of you', 'EAST door LIVING_ROOM']
GARDEN = ['GARDEN', 'You are in a beautiful GARDEN. There is a WELL in front of you', 'EAST door LIVING_ROOM']

ATTIC = ['You are in the ATTIC of the WIZARDS house. There is a giant welding TORCH in the corner', 'Downstairs stairway LIVING_ROOM']
ATTIC = ['ATTIC', 'You are in the ATTIC of the WIZARDS house. There is a giant welding TORCH in the corner', 'Downstairs stairway LIVING_ROOM']

map = [LIVING_ROOM, GARDEN, ATTIC]

object_locations = ['WHISKEY_BOTTLE LIVING_ROOM', 'BUCKET LIVING_ROOM', 'CHAIN GARDEN', 'FROG GARDEN']

location = 'LIVING_ROOM'
location = map[0]

p objects[0]

p map[0]
describe_location(location)

# p location[0]
#
# p objects[0]
#
# p map[0]
#

0 comments on commit e5d9a19

Please sign in to comment.