![]() |
Cavoke
1.1.0
A Platform for creating and hosting multiplayer turn-based board games
|
Client component interaction with the main cavoke application is extremely straightforward.
Let's look into a sample app.qml
based on the one from tictactoe game:
First of all, add a Connections
object to your root object (in this instance Rectangle
). Please set your target as cavoke
and create a function onReceiveUpdate(str)
for receiving signals from the cavoke main application.
Now you can receive and send moves! To receive updates just implement the onReceiveUpdate
slot (in this example it just prints it to console). And to send moves just use cavoke.getMoveFromQml(str)
function.