public class GameSetup
extends java.lang.Object
| Constructor and Description |
|---|
GameSetup() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.gson.JsonObject |
areaMode(java.util.List<Invitee> invitees,
com.google.android.gms.maps.model.LatLngBounds area,
int cellSize)
Creates a JSON object representing the configuration of a multiplayer area mode game.
|
static com.google.gson.JsonObject |
targetMode(java.util.List<Invitee> invitees,
java.util.List<com.google.android.gms.maps.model.LatLng> targets,
int proximityThreshold)
Creates a JSON object representing the configuration of a multiplayer target mode game.
|
public static com.google.gson.JsonObject areaMode(java.util.List<Invitee> invitees, com.google.android.gms.maps.model.LatLngBounds area, int cellSize)
Refer to our API documentation for the structure of the output JSON.
The configuration is valid if there is at least one invitee and a positive (larger than zero) cell size.
invitees - all players involved in the game (never null)area - the area boundariescellSize - the desired cell size in meterspublic static com.google.gson.JsonObject targetMode(java.util.List<Invitee> invitees, java.util.List<com.google.android.gms.maps.model.LatLng> targets, int proximityThreshold)
Refer to our API documentation for the structure of the output JSON.
The configuration is valid if there is at least one invitee, at least one target, and a positive (larger than zero) proximity threshold. If the configuration is invalid, this function returns null.
invitees - all players involved in the game (never null)targets - the positions of all targets (never null)proximityThreshold - the proximity threshold in meters