Commit 975b7612 authored by Jonathan Michalon's avatar Jonathan Michalon
Browse files

ovccclient-client: trigger place_pawn() when Idle

Like for adding tile, place a pawn when Idle (otherwise all actions are chained
since signals are synchronous).
parent 5e98d9ee
......@@ -171,7 +171,10 @@ namespace OVCCClient
sigqueue.add (game.board, game.board.tile_added.connect ((t, p) => {
if (game.current_player == player) {
this.place_pawn (p);
Idle.add (() => {
this.place_pawn (p);
return false;
  • what's the rationale for this?

  • Found debug messages strangely ordered in the bot, dug a little and as I said in the commit message, this avoids geting signals chained synchronously in the middle of another handler. Also to keep handler short and just trigger actions for later run. Plus the fact that it's already the case few lines before for tile placement.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment