Spielerando

A player swaps the offer at the last moment of a trade

Both players press accept, but one of them changed what was on the table a heartbeat before, and the other agrees to a deal they never saw. Here is how a trade window stays honest even when the connection is slow.

Why this works

A yes only means something for the exact thing it was given to. Tying every agreement to a version, and wiping them all when anything changes, means nobody can be tricked into accepting an offer they never saw.

When not to use it

Too heavy for gifts, shop sales or a trade between a player and the game itself, where only one person decides. Use a single confirm there. Also keep it away from trades that must finish in seconds, such as a quick pass in a match.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • A diagram of every state
  • 49 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "A player swaps the offer at the last moment of a trade" (read_entry trade-window-lock-confirm-version) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP