minicrossterm/examples/program_examples
Timon Post b717d306c3 Putted Screen behind an Option. Now when you call the functions: color, cursor, terminal, input you won't need to provide a Screen anymore.
When you want to work with the 'alternate screen' you can call the following functions: terminal::from_screen etc. Which will give you an instance to the back of the module you are calling it in.

So instead of:

let color = color(Screen::default());
let cursor = cursor(Screen::default());
let input = input(Screen::default());
let terminal = terminal(Screen::default());

You can do:

let color = color();
let cursor = cursor();
let input = input();
let terminal = terminal();
2018-11-21 07:54:16 -08:00
..
first_depth_search Putted Screen behind an Option. Now when you call the functions: color, cursor, terminal, input you won't need to provide a Screen anymore. 2018-11-21 07:54:16 -08:00
snake Putted Screen behind an Option. Now when you call the functions: color, cursor, terminal, input you won't need to provide a Screen anymore. 2018-11-21 07:54:16 -08:00
command_bar.rs Putted Screen behind an Option. Now when you call the functions: color, cursor, terminal, input you won't need to provide a Screen anymore. 2018-11-21 07:54:16 -08:00
logging.rs removed in examples for unused variables 2018-10-07 17:16:35 +02:00
README.md updated doc 2018-08-25 12:00:39 +02:00

This folder will contain some examples of how to use this crate in an real live environment.

If you have created a game or something feel free to upload it, would be a great help for other people and me to make this crate better!

The programs are:

  • First depth search:

    This is an search algorithm implemented visually. This program uses the following functionalities: cursor movement, coloring, alternate screen and terminal clearing. To run this use cargo run in the directory of first depth search.

  • Snake

    This is a snake game implemented with this library. To run this use cargo run in the directory of snake.

  • Command Bar:

    This is a terminal application where multiple threads write to the output while you can enter commands asynchronously. To run this use cargo run --example command_bar

  • Logging:

    This is an async logging program to demonstrate asynchronous logging with an queue. To run this use cargo run --example logging