Mavkit_smart_rollup_node.Refutation_playermodule Worker : Mavryk_workers.Worker.TWorker module for a single refutation game player. The node's refutation coordinator will spawn a new refutation player for each refutation game.
type worker = Worker.infinite Worker.queue Worker.tType for a refutation game player.
val init_and_play :
Node_context.rw ->
self:Mavryk_crypto.Signature.public_key_hash ->
conflict:Mavkit_smart_rollup.Game.conflict ->
game:Mavkit_smart_rollup.Game.t option ->
level:int32 ->
unit Mavryk_base.TzPervasives.tzresult Lwt.tinit_and_play node_ctxt ~self ~conflict ~game ~level initializes a new refutation game player for signer self. After initizialization, the worker will play the next move depending on the game state. If no game is passed, the worker will play the opening move for conflict.
val play : worker -> Mavkit_smart_rollup.Game.t -> level:int32 -> unit Lwt.tplay worker game ~level makes the worker play the next move depending on the game state for their conflict.
val shutdown : worker -> unit Lwt.tShutdown a refutaiton game player.
val current_games :
unit ->
(Mavryk_crypto.Signature.public_key_hash * worker) listcurrent_games () lists the opponents' this node is playing refutation games against, alongside the worker that takes care of each game.