# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/8-complete-code-files-for-coordinate-battle
# Local doc: epic-docs/documentation/en-us/fortnite/8-complete-code-files-for-coordinate-battle.md
# Section: game\_manager.verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { DataTypes }
using { UtilityFunctions }
per_player_objects<public> := class:
@editable
Board<public>:board
@editable
Miniboard<public>:miniboard
var AttackedTiles<public>:[]tile_coordinate = array{}
MoveEvent<public>:event(tuple(tile_coordinate, move_type)) = event(tuple(tile_coordinate, move_type)){}
CoordinateChangeEvent<public>:event(tile_coordinate) = event(tile_coordinate){}
# A Verse-authored creative device that can be placed in a level
game_manager := class(creative_device):
var PerPlayerManagement:weak_map(agent, per_player_objects) = map{}
@editable
PerPlayerObjects:[]per_player_objects = array{}
@editable
RevealDistance:int = 1
AssignPlayerObjects():void =
for (Index -> Player : GetPlayspace().GetPlayers()):
if:
PlayerObjects := PerPlayerObjects[Index]
set PerPlayerManagement[Player] = PlayerObjects
then:
# Set player objects successfully
Verse Library
verse
04 Game Manager Verse
Implements a turn-based multiplayer board game with per-player state, events, and win condition logic.
extracted-snippets/documentation/en-us/fortnite/8-complete-code-files-for-coordinate-battle/04-game-manager-verse.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.