Enum act::Action [] [src]

pub enum Action {
    PickUp(StringStringString),
    Move(StringStringString),
}

An Action is composed of three strings. The first one is the text that will be shown to the user. The second is what the action will do. For example, in a PickUp action, it would be the item that would be given to the user. The third one is the requirement. This will check if the user has the item specified, and only if true will proceed.

Examples

use act::Action;

fn main() {
    let move_to_locked = Action::Move("Unlock the door ","locked_room","LockedRoomKey");
}

Variants

Methods

impl Action
[src]

Trait Implementations

impl Clone for Action
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Action
[src]

Formats the value using the given formatter.