fix host dish visibility, show correct countries to host
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -136,7 +136,7 @@ describe("GameManager", () => {
|
||||
it("hides correct country for unrevealed dishes", () => {
|
||||
gm.addDish("Köttbullar", "SE")
|
||||
const lookup = new Map<string, string>()
|
||||
const state = gm.getGameStateForPlayer("p1", lookup)
|
||||
const state = gm.getGameStateForPlayer("p1", lookup, false)
|
||||
expect(state.dishes[0]?.correctCountry).toBe("")
|
||||
})
|
||||
|
||||
@@ -144,7 +144,14 @@ describe("GameManager", () => {
|
||||
gm.addDish("Köttbullar", "SE")
|
||||
gm.revealDishes()
|
||||
const lookup = new Map<string, string>()
|
||||
const state = gm.getGameStateForPlayer("p1", lookup)
|
||||
const state = gm.getGameStateForPlayer("p1", lookup, false)
|
||||
expect(state.dishes[0]?.correctCountry).toBe("SE")
|
||||
})
|
||||
|
||||
it("shows correct country to host for unrevealed dishes", () => {
|
||||
gm.addDish("Köttbullar", "SE")
|
||||
const lookup = new Map<string, string>()
|
||||
const state = gm.getGameStateForPlayer("p1", lookup, true)
|
||||
expect(state.dishes[0]?.correctCountry).toBe("SE")
|
||||
})
|
||||
|
||||
@@ -152,7 +159,7 @@ describe("GameManager", () => {
|
||||
gm.submitPrediction("p1", "SE", ["DE", "IT", "FR"], "GB")
|
||||
gm.submitPrediction("p2", "NO", ["DE", "IT", "FR"], "GB")
|
||||
const lookup = new Map<string, string>()
|
||||
const state = gm.getGameStateForPlayer("p1", lookup)
|
||||
const state = gm.getGameStateForPlayer("p1", lookup, false)
|
||||
expect(state.myPrediction?.predictedWinner).toBe("SE")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user