7. Construct the Game
The final step is to put all the pieces together through a game manager. The game manager controls the assignment of gameplay objects to players and the flow of the game loop. Specifically, the game manager:
- Assigns gameplay objects such as board and miniboard to players.
- Controls the logic of the game loop, including what happens when a move occurs.
- Determines when a player has won and gameplay ends.
Define the Move Types
During a player's turn, the player chooses a coordinate on the game board. Once a coordinate is chosen, there are two different move types:
- Attack: Attempt to destroy the pawn at the given location.
- Reveal: Reveal all pawns within a certain radius of a given location.
In the DataTypes module, add the following enum defining the move types:
| | |
| --- | --- |
| | using{/Verse.org/Simulation} |
| | using{/Verse.org/Random} |
| | using{/UnrealEngine.com/Temporary/SpatialMath} |
| | |
| | DataTypes<public> := module: |
| | |
| | ... |
| | |
| | move_type<public> := enum<open>: |
| | Attack |
| | Reveal |
| | Unknown |
using{/Verse.org/Simulation} using{/Verse.org/Random} using{/UnrealEngine.com/Temporary/SpatialMath} DataTypes<public> := module: ... move_type<public> := enum<open>: Attack Reveal Unknown
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.