Example: two-player duel
This example demonstrates alternating turns and separate score state for two players.
State
private int currentPlayer;
private readonly int[] score = new int[2];
private readonly int[] shots = new int[2];
private void OnHit(VorivoxHit hit)
{
int points = ResolveTarget(hit);
score[currentPlayer] += points;
shots[currentPlayer]++;
currentPlayer = 1 - currentPlayer;
UpdateTurnIndicator();
}
Result
The primary score may contain the winner's score. Store richer per-player data only in a protocol extension agreed with Launcher. Do not serialize an array into the numeric score field.
The current base contract is designed around an aggregate result. Extended per-player results require a separately versioned Launcher API.