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
28
29
30
31
32
33
34
35
36
37
38
39
40
use crateGameBuilder;
/// Set forth!
///
/// Here is a minimal example to run your game:
///
/// ```rust
/// use kero::core::{Context, Game, GameError};
/// use kero::gfx::Draw;
///
/// fn main() -> Result<(), GameError> {
/// kero::new_game()
/// .with_title("Minimal")
/// .with_size(1280, 720)
/// .run::<MinimalExample>(())
/// }
///
/// pub struct MinimalExample;
///
/// impl Game for MinimalExample {
/// type Config = ();
///
/// fn new(_ctx: &Context, _cfg: Self::Config) -> Result<Self, GameError> {
/// Ok(Self)
/// }
///
/// fn update(&mut self, _ctx: &Context) -> Result<(), GameError> {
/// Ok(())
/// }
///
/// fn render(&mut self, _ctx: &Context, _draw: &mut Draw) -> Result<(), GameError> {
/// Ok(())
/// }
/// }
/// ```
///
/// See the [`Game`](crate::core::Game) trait for more info.