function p.get_is_solid()
    return true
end

function p.get_tex()
    return "block_hall"
end

function p.main()
    set_default_block("s")
    
    --Carving the room.
    create_rect("e", 1,1,1, 14,14,14)

    -- Carving the three doors.
    create_rect("e", 6,15,6, 8,15,8)
    create_rect("e", 15,6,6, 15,8,8)
    create_rect("e", 6,0,6, 8,0,8)

    -- Setting the random seed.
    -- The seed is automatically set this way
    -- before the main function is called.
    srand(seed_normal())

    -- Blocks of random type.
    for z = 2,14 do
        f = randf()
        block_type = ""
        if f < 0.5
        then block_type = "r_kitchen"
        else block_type = "r_bathroom2"
        end
        set_pos(1,1,z, block_type)
    end

    -- Blocks at random positions.
    for i = 1,50 do
        x = randi(1,14)
        y = randi(1,14)
        z = 1
        set_pos(x,y,z,"r_kitchen")
    end
    
    local msg_str = "Pseudo random functions can be called "
        .. "from the main function.  The seed is set by calling "
        .. "^x00ff00srand^!.  Note: this is not the same as the c function. "
        .. "The function ^x00ff00randf()^! returns a random floating point "
        .. "between 0.0 and 1.0, and the function ^x00ff00randi(a,b)^! "
        .. "returns a random integer between a and b inclusive. "
        .. "See Floor3/tut_lev3_rand.lua "
        .. "(the file for this chunk) to see how these functions work. "
    add_bent_s(7,7,7,"bent_base_txt",msg_str)
end
