Add lobby and pack concept.
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@ async function post(path: string, body: unknown): Promise<Session> {
|
||||
|
||||
export type BotDifficulty = 'easy' | 'medium' | 'hard'
|
||||
|
||||
export function createGame(name: string, bot?: BotDifficulty): Promise<Session> {
|
||||
return post('/api/games', bot ? { name, bot } : { name })
|
||||
export function createGame(name: string): Promise<Session> {
|
||||
return post('/api/games', { name })
|
||||
}
|
||||
|
||||
export function joinGame(code: string, name: string): Promise<Session> {
|
||||
|
||||
Reference in New Issue
Block a user