Trait console_games::Play

source ·
pub trait Play {
    fn name(&self) -> &'static str;
    fn print_intro(&self);
    fn start(&mut self);
}
Expand description

The main trait to classify a struct as a playable game.

Required Methods§

returns the name of the game

print the game’s intro or description before the game starts

start the game and should return when the game ends

Implementors§