1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! A Befunge interpreter written in Rust
//!
//! The [`playfield`] module provides all functionality to navigate through a Befunge program
//! and the [`interpreter`] module implements roughly the [Befunge-93 semantics].
//!
//! # Example
//!
//! ```
//! # use berust::interpreter::{StdInputOutput, Interpreter};
//! # use berust::playfield::Playfield;
//! let playfield = Playfield::new("23*.@");
//! let io = StdInputOutput::default();
//!
//! let interpreter = Interpreter::new(playfield, io);
//!
//! // prints 6 to stdout
//! for _ in interpreter {}
//! ```
//!
//! [`playfield`]: playfield/index.html
//! [`interpreter`]: interpreter/index.html
//! [Befunge-93 semantics]: https://en.wikipedia.org/wiki/Befunge#Befunge-93_instruction_list

extern crate rand;

pub mod interpreter;
pub mod playfield;