b48556d1f2
Der Host nimmt Gäste auf, macht aus ihren Aktionen Befehle für den Spieler ihrer Verbindung, begrenzt sie pro Takt und schickt jeden Takt an alle Gäste. Gäste rechnen jeden Takt nach, vergleichen die Prüfsummen und holen sich nach einer Abweichung die Welt des Hosts neu. Tests verbinden Host und Gäste im Speicher, auch über 2000 Takte mit Gehen und Wiederkommen. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
24 lines
625 B
Rust
24 lines
625 B
Rust
//! Deterministic core of Grovewright.
|
|
//!
|
|
//! Everything that belongs to the shared world lives here. The core never
|
|
//! touches the engine, the clock, files or the network, and it calculates
|
|
//! only with whole numbers. Given the same commands it produces the same
|
|
//! world on every machine. That is what lets every player simulate the whole
|
|
//! world and exchange nothing but commands.
|
|
|
|
pub mod codec;
|
|
pub mod command;
|
|
pub mod guest;
|
|
pub mod hash;
|
|
pub mod host;
|
|
pub mod inventory;
|
|
pub mod map;
|
|
pub mod mapgen;
|
|
pub mod player;
|
|
pub mod protocol;
|
|
pub mod replay;
|
|
pub mod rng;
|
|
pub mod rules;
|
|
pub mod snapshot;
|
|
pub mod world;
|