added basic network play
This commit is contained in:
@ -62,9 +62,13 @@ public:
|
||||
void setLevelUpCallback(LevelUpCallback cb) { levelUpCallback = cb; }
|
||||
|
||||
void reset(int startLevel = 0);
|
||||
void resetDeterministic(int startLevel, uint32_t seed);
|
||||
void tickGravity(double frameMs);
|
||||
void updateVisualEffects(double frameMs);
|
||||
|
||||
// Determinism / desync detection
|
||||
uint64_t computeStateHash() const;
|
||||
|
||||
// Per-player inputs -----------------------------------------------------
|
||||
void setSoftDropping(PlayerSide side, bool on);
|
||||
void move(PlayerSide side, int dx);
|
||||
@ -111,6 +115,8 @@ public:
|
||||
private:
|
||||
static constexpr double LOCK_DELAY_MS = 500.0;
|
||||
|
||||
void resetInternal(int startLevel_, const std::optional<uint32_t>& seedOpt);
|
||||
|
||||
std::array<Cell, COLS * ROWS> board{};
|
||||
std::array<RowHalfState, ROWS> rowStates{};
|
||||
PlayerState left{};
|
||||
|
||||
Reference in New Issue
Block a user