feat: add player Names Throughout the Game UI
This commit is contained in:
+9
-2
@@ -271,7 +271,7 @@ components:
|
||||
properties: { role: { $ref: '#/components/schemas/Role' } }
|
||||
Info:
|
||||
type: object
|
||||
required: [ok, phase, gameId, version, player1Available, player2Available, spectatorsAvailable]
|
||||
required: [ok, phase, gameId, version, player1Available, player2Available, player1Name, player2Name, spectatorsAvailable]
|
||||
properties:
|
||||
ok: { type: boolean, enum: [true] }
|
||||
phase: { $ref: '#/components/schemas/Phase' }
|
||||
@@ -279,6 +279,8 @@ components:
|
||||
version: { $ref: '#/components/schemas/GameId' }
|
||||
player1Available: { type: boolean }
|
||||
player2Available: { type: boolean }
|
||||
player1Name: { type: string, maxLength: 20 }
|
||||
player2Name: { type: string, maxLength: 20 }
|
||||
spectatorsAvailable: { type: integer, minimum: 0, maximum: 8 }
|
||||
Health:
|
||||
type: object
|
||||
@@ -311,7 +313,7 @@ components:
|
||||
description: '[games, wins, losses, shipsSunk, shots, hits, misses]'
|
||||
State:
|
||||
type: object
|
||||
required: [type, version, gameId, phase, mode, viewer, turn, boards, wins, winner, statistics]
|
||||
required: [type, version, gameId, phase, mode, viewer, turn, players, boards, wins, winner, statistics]
|
||||
properties:
|
||||
type: { type: string, enum: [state] }
|
||||
version: { $ref: '#/components/schemas/GameId' }
|
||||
@@ -320,6 +322,11 @@ components:
|
||||
mode: { $ref: '#/components/schemas/Mode' }
|
||||
viewer: { $ref: '#/components/schemas/Role' }
|
||||
turn: { type: string, enum: [player1, player2] }
|
||||
players:
|
||||
type: array
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
items: { type: string, maxLength: 20 }
|
||||
boards:
|
||||
type: array
|
||||
minItems: 2
|
||||
|
||||
Reference in New Issue
Block a user