Sha256: f17ea57c491ffa9280784ae79c3449ef4425d0611b72ac1c7f06fd73db526573

Contents?: true

Size: 430 Bytes

Versions: 2

Compression:

Stored size: 430 Bytes

Contents

module Rubinstein
  module Actions
    module Movement

      def walk(*args)
        args.flatten!
        if !args[0]
          __puts "Which way?" 
        elsif @__world.player.location.exits[args[0]]
          @__world.player.location = @__world.locations[@__world.player.location.exits[args[0]]]
          look
        else
          __puts "You can't go that way"
        end
        __handle!
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubinstein-0.0.2 lib/rubinstein/actions/movement.rb
rubinstein-0.0.1 lib/rubinstein/actions/movement.rb