Enum act::Action
[−]
[src]
pub enum Action { PickUp(String, String, String), Move(String, String, String), }
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
PickUp(String, String, String)
Move(String, String, String)
Methods
impl Action
[src]
Trait Implementations
impl Clone for Action
[src]
fn clone(&self) -> Action
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more