This commit is contained in:
Forrest 2026-10-01 23:01:56 -04:00
parent 0cba7f5ee0
commit 32ed347b58
172 changed files with 5464 additions and 582 deletions

View file

@ -149,7 +149,8 @@ func _check_game(t: Dictionary, index: Dictionary) -> Dictionary:
if dealt != decks:
return fail.call(0, "dealt different decks: %s vs TS %s" % [JSON.stringify(dealt), JSON.stringify(decks)])
var s = RulesEngine.create_game({"pool": _pool, "decks": decks, "seed": seed, "rules": rules, "log": true})
# With events on, so the run also shows that recording them leaves the rules alone.
var s = RulesEngine.create_game({"pool": _pool, "decks": decks, "seed": seed, "rules": rules, "log": true, "events": true})
if s == null or not Util.errors.is_empty():
return fail.call(0, "create_game failed: %s" % "; ".join(Util.errors))
var initial: Dictionary = t.initial
@ -226,11 +227,13 @@ func _compare(s: Dictionary, t: Dictionary, n: int, state_md5: String, log_md5:
return ""
## The state as fingerprinted: without its card defs (fixed for the game) and log (checked by line).
## The state as fingerprinted: without its card defs (fixed for the game), log (checked by line) and
## events (TS has none, see godot-plan.md §3).
func _body(s: Dictionary) -> Dictionary:
var b := s.duplicate()
b.erase("defs")
b.erase("log")
b.erase("events")
return b