Boardgame --> Thinking in other trhead?

Bas Hamstra

Member
Licensed User
Longtime User
Hello, I need some advice. I am working on a boardgame, for starters the user can play only against computer brain.

The computer brain is a B4A object, that for example contains a method "think" where it would think for some seconds and then returns a "move" which the gui will display.

I would like the brain to execute in another thread, to keep the UI alive during the CPU intensive thinking. What is recommended here? First I thought I run the Brain object in a service module, but it seems the service module runs in the same thread as UI.

I have looked at the Threads lib, but some code snippets would greatly help.

Thanks in advance, Bas
 
Top