Hello, > I'm curious. What is the reason that you're calling Main::iteration() > instead of Main::run()? In the example I could have used 'Main::run()' but I have not thought of it. In my project I want to have the control in the program flow, not in the gui. There I have a class 'UI' which gets events from the program flow. The ui itself contains all gtkmm parts. If I would use 'Main::run()' instead of 'Main::iteration()' I have to let the UI take over the control. Example: game starts +- player 1 has to play a card (AI) | `- calculates, calls 'Main::iteration()' +- player 2 has to play a card (human) +- ask UI to return a card `- trick full `- wait for UI With the UI in control it would be something like this (or a mix of both) Window +- game starts -- tell 'Game' to start itself +- ask player 1 for a card, give it to the game | `- calculates, calls 'Main::iteration()' +- ask human (by graphical interface) for a card, give it to the game +- tell the game to close the trick So there is no way to get rid of calls of 'Main::iteration()' while the computer is calculating as far as I know. I prefer the first version, it is simplier in my opinion, and it is less work to change the user interface (I plan to add a text based one). Greetings Diether Knof
Attachment:
signature.asc
Description: Digital signature