The opponent the hall seats is a housecarl, from the Old Norse húskarl

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-23 17:19:06 -04:00
co-authored by Claude Fable 5.1
parent 8da83e64b0
commit c553902d8a
8 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -325,7 +325,7 @@ export class Rooms<State, Input> {
/** The host seats a bot in an empty chair. */
addBot(room: Room<State>, token: string | undefined): Seat {
const host = this.seatOf(room, token);
if (host.id !== room.seats[0]?.id) throw new RoomError('Only the player who opened the table may seat a bot.', 403);
if (host.id !== room.seats[0]?.id) throw new RoomError('Only the player who opened the table may seat a housecarl.', 403);
if (room.state) throw new RoomError('The game has begun; no more seats are taken.', 409);
const taken = new Set(room.seats.map((s) => s.name.toLowerCase()));
const pool = this.game.botNames.filter((n) => !taken.has(n.toLowerCase()));
@@ -352,10 +352,10 @@ export class Rooms<State, Input> {
/** The host sends a bot away before the game begins. People leave by not coming back. */
unseat(room: Room<State>, token: string | undefined, seatId: unknown): void {
const host = this.seatOf(room, token);
if (host.id !== room.seats[0]?.id) throw new RoomError('Only the player who opened the table may send a bot away.', 403);
if (host.id !== room.seats[0]?.id) throw new RoomError('Only the player who opened the table may send a housecarl away.', 403);
if (room.state) throw new RoomError('The game has begun; the table is set.', 409);
const seat = room.seats.find((s) => s.id === seatId);
if (!seat || !seat.bot) throw new RoomError('Only a bot can be sent away.', 400);
if (!seat || !seat.bot) throw new RoomError('Only a housecarl can be sent away.', 400);
this.commit(room, { t: 'unseat', id: seat.id });
}