Outfits

MenuAdventures.OutfitsModule
MenuAdventures.Outfits

A sub-module that enables the player to wear clothes.

julia> using MenuAdventures

julia> using MenuAdventures.Testing

julia> using MenuAdventures.Outfits

julia> import MenuAdventures: ever_possible

julia> @universe struct Universe <: AbstractUniverse
        end;

julia> @noun struct Room <: AbstractRoom
            already_lit::Bool = true
        end;

julia> @noun struct Person <: Noun
        end;

julia> @noun struct Clothes <: Noun
        end;

julia> ever_possible(::Dress, ::Inventory, ::Clothes) = true;

julia> ever_possible(::Take, ::Reachable, ::Clothes) = true;

julia> ever_possible(::Dress, ::Reachable, ::Person) = true;

julia> cd(joinpath(pkgdir(MenuAdventures), "test", "Outfits")) do
            check_choices() do interface
                you = Person(
                    "Brandon",
                    grammatical_person = second_person,
                    indefinite_article = "",
                )
                room = Room("room")
                coat = Clothes("coat")
                universe = Universe(you, interface = interface)
                universe[room, you] = Containing()
                universe[room, Clothes("coat")] = Containing()
                universe
            end
        end
true
source