rust_warrior/lib.rs
1//! # Rust Warrior
2//!
3//! A textual turn-based AI game for learning Rust, based on
4//! [Ruby Warrior](https://github.com/ryanb/ruby-warrior).
5//!
6//! You will progress through levels controlling the
7//! [`Warrior`](crate::warrior::Warrior), by deciding which action
8//! to take based on the surroundings. These decisions will be defined with
9//! Rust code in the `play_turn` method of [`Player`](crate::player::Player).
10//!
11//! ### A Note About Rust vs Ruby
12//!
13//! There are some notable differences between this game and Ruby
14//! Warrior. Since Ruby is an interpreted language, Ruby Warrior is played
15//! by interacting with a `player.rb` script which controls the warrior.
16//! The `rubywarrior` command then leverages the Ruby interpreter to run
17//! that script. In the Rust version, you will generate a Rust project which
18//! includes `rust-warrior` as a dependency in its `Cargo.toml` file. The
19//! [`Game`](crate::game::Game) is then imported. To run it, you simply use
20//! `cargo run` like in any other Rust project.
21
22pub mod actions;
23pub mod engine;
24pub mod floor;
25pub mod game;
26pub mod player;
27pub mod profile;
28pub mod starter;
29pub mod ui;
30pub mod unit;
31pub mod warrior;
32
33pub use actions::Direction;
34pub use floor::Tile;
35pub use game::Game;
36pub use player::Player;
37pub use unit::UnitType;
38pub use warrior::Warrior;