File size: 333 Bytes
9a42933
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { getRandomChallengeId } from "@/lib/getRandomChallengeId"
import { Challenge } from "@/types"

export function newChallenge(message: Partial<Challenge> = {}): Challenge {
  return {
    id: getRandomChallengeId(),
    fromPlayer: "",
    toPlayer: "",
    assetUrl: "",
    prompt: "",
    solved: false,
    ...message
  }
}