Class TGame
Unit
Declaration
type TGame = class(TObject)
Description
Owns the mutable match state. The caller owns this object. Use Snapshot to read state without exposing the live brick array.
Source: src/Breakout.Game.pas (line 11).
Hierarchy
- TObject
- TGame
Overview
Methods
| Public | constructor Create(const Config: TGameConfig; Seed: Cardinal); |
| Public | procedure Execute(Command: TGameCommand); |
| Public | procedure MovePaddle(CenterX: Double; AllowPaused: Boolean = False); |
| Public | procedure Step; |
| Public | function Snapshot: TGameSnapshot; |
Properties
| Public | property State: TGameState read FState; |
Description
Methods
| Public | constructor Create(const Config: TGameConfig; Seed: Cardinal); |
|
Starts a ready match with deterministic generation. Raises Parameters
Source: src/Breakout.Game.pas (line 38). | |
| Public | procedure Execute(Command: TGameCommand); |
|
Applies one lifecycle command. Launch starts Ready, or loads the next board in Ready after LevelComplete while preserving lives/score. Victory requires Restart, which resets the whole seeded match. DebugStep advances once only when paused; it can change state after a loss or final brick. Source: src/Breakout.Game.pas (line 43). | |
| Public | procedure MovePaddle(CenterX: Double; AllowPaused: Boolean = False); |
|
Moves the paddle in Ready/Playing and carries the ready ball. Paused diagnostics may opt in to reposition only the paddle between debug steps; the ball and simulation remain frozen. Parameters
Source: src/Breakout.Game.pas (line 49). | |
| Public | procedure Step; |
|
Advances one FixedDeltaSeconds quantum only while Playing. Earliest impacts consume time, reflect velocity and continue the remaining interval, up to MaxImpactsPerStep. Source: src/Breakout.Game.pas (line 53). | |
| Public | function Snapshot: TGameSnapshot; |
|
Returns values and a copy of the brick array. Painting this snapshot must not call Step or modify the live engine. Source: src/Breakout.Game.pas (line 56). | |
Properties
| Public | property State: TGameState read FState; |
|
This item has no description. Source: src/Breakout.Game.pas (line 57). | |
Generated by PasDoc 1.0.4.