2

To make my question specific, what I want to develop is a multi-step game. And the thing I want to realize is, let's say now we have the game taking players A & B included, and both A & B have the freedom to send transactions to the game contract. In some certain round A may send a valid transaction to the contract can make him win, but is there some method we can develop to hold the contract for a while not yielding the final result (A wins) to see whether or not there is another valid transaction coming from another player (B)?

1

Nothing can occur in the contract unless a transaction triggers the action. To my knowledge there is no conditionally delayed transaction. Someone would need to pay the gas for a delayed transaction.

Player A could initiate a game completion transaction after the wait period had passed. The transaction would check to verify enough time had passed before allowing the game completion. This puts the onus on the player who thinks he or she has won to complete the game, which I assume the winner would want to do.

  • is there already something like waiting-cost gas? – Wang Apr 8 '16 at 15:02
  • Contracts can't have a pool of gas to be used by callers. They can own some gas. There are some interesting ideas in this discussion: forum.ethereum.org/discussion/2401/…. Perhapse the contract can reimburse the caller for spent gas. – Robert Graves Apr 8 '16 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.