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
// Copyright (C) 2025 Christian Mauduit <ufoot@ufoot.org>
//! Game state trait for advancing game logic.
//!
//! This module contains the [`GameState`] trait which defines the interface
//! for any game state that can be advanced step by step.
/// Trait for game state that can be advanced by steps.
///
/// Implement this trait for your game world to allow it to be driven
/// by a [`GameHandler`](crate::GameHandler) which manages timing and step execution.
///
/// # Example
///
/// ```
/// use liquidwar7core::GameState;
///
/// struct MyGameState {
/// score: u32,
/// }
///
/// impl GameState for MyGameState {
/// fn do_step(&mut self, odd_even: bool, steps_count: u64) {
/// // Update game logic here
/// self.score += 1;
/// }
/// }
/// ```