Hello, Bracket Terminal!

Storing state

The game loop runs by calling our application’s tick() function with every frame. The tick() function doesn’t know anything about our game, so we need a way to store the game’s current status. This is known as the Game state. Everything we need to preserve between frames is kept in our game’s state. At any given moment, the state represents a snapshot of the current game.

Create a new, empty struct named State:

Get hands-on with 1200+ tech skills courses.