lib/t10/dungeon/traversable.rb
# Prepares the entrance room by modifying the `@doors` instance variable
# so that it can connect to the other rooms. Any first room to be
# connected must use this method.
#
# @return [void]
Prepares the entrance room by modifying the `@doors` instance variable
so that it can connect to the other rooms. Any first room to be
connected must use this method.
Prepares the entrance room by modifying the ` @doors ` instance variable so that it can connect to the other rooms . Any first room to be connected must use this method .
def prepare_entrance!
        int_direction = [:ahead, :origin, :to_left, :to_right]
        @doors.each do |ext_direction, _|
          int_dir_pluck = int_direction.delete_at(rand(int_direction.length))
          @doors[ext_direction].push(int_dir_pluck, nil)
        end
      end
def prepare_entrance! int_direction = [ :ahead , :origin , :to_left , :to_right ] @doors . each do | ext_direction , _ | int_dir_pluck = int_direction . delete_at ( rand ( int_direction . length ) ) @doors [ ext_direction ] . push ( int_dir_pluck , nil ) end end
Prepares the entrance room by modifying the `@doors` instance variable
so that it can connect to the other rooms.
Prepares the entrance room by modifying the ` @doors ` instance variable so that it can connect to the other rooms .
None
void