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,6 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import type { PlayerInfo } from '../types';
|
||||
import { computeTotal } from '../lib/standings';
|
||||
import { displayName } from '../lib/names';
|
||||
|
||||
interface Props {
|
||||
standings: number[][][];
|
||||
@@ -62,7 +63,7 @@ export default function Standings({ standings, guesses = [], players, myOrder, d
|
||||
}`}
|
||||
style={{ fontSize: fz.head }}
|
||||
>
|
||||
{p.name}
|
||||
{displayName(p.name)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { PlayerInfo, StashData } from '../types';
|
||||
import CardView from './CardView';
|
||||
import { displayName } from '../lib/names';
|
||||
|
||||
interface Props {
|
||||
stash: StashData | null;
|
||||
@@ -18,7 +19,7 @@ export default function Trick({ stash, players, myOrder }: Props) {
|
||||
: [];
|
||||
|
||||
const nameFor = (order: number) =>
|
||||
players.find((p) => p.order === order)?.name ?? '';
|
||||
displayName(players.find((p) => p.order === order)?.name);
|
||||
|
||||
const overlap = -16;
|
||||
const slotH = 80;
|
||||
|
||||
Reference in New Issue
Block a user