{
slug: {
type: String,
required: "Slug is required"
},
players: [playerSchema]
},
maxPlayers: {
type: Number,
default: 12
},
currentGame: {
type: Mongoose.Object.id,
ref: "Game"
},
previousGames: Object
}
{
username: {
type: String,
required: "Username is required"
}
}
{
name: {
type: String,
required: "Team name is required",
default: randomTeamNameGenerator()
},
players: [playerSchema]
}
{
scores: Object,
teams: [teamSchema],
currentTeamIndex: {
type: Number,
default: 0
},
currentPlayerIndex: {
type: Number,
default: 0
},
currentRound: {
type: String,
enum: ["Taboo", "Charades", "Password"],
default: "Taboo"
},
rounds: roundsSchema
clues: [clueSchema]
}
{
taboo: roundSchema,
password: roundSchema,
charades: roundSchema
}
{
guessedClues: [clueSchema],
remainingClues: [clueSchema],
scores: Object
}
{
player: {
type: String
},
phrase: {
type: String
validate: {
validator: function(v) {
const splitPhrase = v.split(' ');
return splitPhrase <= 3 && splitPhrase > 0;
},
message: 'Clue phrase must be between 1 and 3 words.'
}
}
}
{
entities: {
clues: {
remaining: [],
guessed: [],
skipped: []
},
round: {
roundName: "Taboo"
},
game: {
scores: {
"team1": 25,
"team2": 50
}
}
},
session: {
currentUser: {
username: "username",
teamName: "team1"
}
},
errors: {
}
}
- /lobby
- /createRoom/
- /room/:roomId