Crates.io | space_traveller |
lib.rs | space_traveller |
version | 0.6.0 |
source | src |
created_at | 2024-04-25 19:48:03.247717 |
updated_at | 2024-04-26 07:23:42.303142 |
description | A simple command-line game engine based on the MVC architecture, centered around cosmic space. |
homepage | |
repository | https://github.com/MateuszWalewski/space_traveller |
max_upload_size | |
id | 1220696 |
size | 28,407 |
A simple command-line game engine based on the MVC architecture, centered around cosmic space. The "reader" and "viewer" components are fully customizable as public trait objects that are injected to the main part. It may serve as a starting point for crafting epic, old-school RPGs, enriching the knowledge of the universe.
use space_traveller::{view, GameManager, StdInputReader};
fn main() {
let std_reader = StdInputReader;
let console_view = view::ConsoleView;
let gm = GameManager::new(std_reader, console_view);
let gm = gm.add_players();
let gm = gm.start_game();
gm.finish_game();
}