Frontend: pridavanie botov v lobby
Hostitel prida na volne sedadlo bota (+ Bot = heuristika, + AI bot = natrenovana siet) alebo bota odoberie; boti maju vlastnu ikonu a flag is_bot v rosteroch. Surove ucty bot:<kind>-<n> sa vsade zobrazuju cez displayName ako "Bot 2" / "AI bot 1" (stol, kopka, tabulky, historia). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
23de3ae3ac
commit
b1010ae008
9 files changed
+68
-11
No files matched your search
@@ -50,6 +50,10 @@ export const emit = {
|
||||
// Reopen a prematurely-ended game from history back into the lobby.
|
||||
restoreGame: (gid: string) => socket.emit('restore_game', gid),
|
||||
leaveGame: () => socket.emit('leave_game'),
|
||||
// Bots: host-only, before the game starts (seat picked by the server).
|
||||
// kind: 'heuristic' (default) | 'neural' (trained net) | 'random'
|
||||
addBot: (gid: string, kind: string = 'heuristic') => socket.emit('add_bot', gid, kind),
|
||||
removeBot: (gid: string, order: number) => socket.emit('remove_bot', gid, order),
|
||||
endGame: (gid: string) => socket.emit('end_game', gid),
|
||||
startGame: (gid: string) => socket.emit('start_game', gid),
|
||||
reconnectToGame: (gid: string, token: string) => socket.emit('reconnect_to_game', gid, token),
|
||||
|
||||
Reference in new issue
Block a user