ludic.session: ply_rest_least, the party's rest for the clock (the valley's selftest57 down into the packages): the roster's freed slot reused and ply_leave_all, the nearest player alone, and ludic.shop's week of demand leaving the shared Random stream untouched
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5bc2342174
commit
78c261c625
5 changed files with 46 additions and 1 deletions
|
|
@ -153,6 +153,7 @@ program ShopTest {
|
|||
}
|
||||
|
||||
test "the week's demand is the shop's own dice, and turns with the week" (shop_st: mut ShopState, shop_test_st: mut ShopTestState) {
|
||||
Random.seed(77) # the world's shared stream, which a price never moves
|
||||
fresh(shop_st, shop_test_st)
|
||||
shop_roll(shop_st) # the shop's tick rolls the week; asking only reads it
|
||||
let a = shop_wanted(shop_st, 0)
|
||||
|
|
@ -165,6 +166,9 @@ program ShopTest {
|
|||
let plain = shop_price_sell_at(shop_st, -1, it)
|
||||
expect(shop_demand_mult(shop_st, 0, it) == 1.5)
|
||||
expect(shop_price_sell(shop_st, it) >= plain)
|
||||
let shared = Random.range(0, 999999)
|
||||
Random.seed(77)
|
||||
expect_eq(shared, Random.range(0, 999999))
|
||||
var moved = false
|
||||
for w in 1 .. 12 {
|
||||
shop_test_st.day = 1 + w * 7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue