Hi all,
I just recently started learning BGA Studio; I was following the Hearts tutorial to the letter, but run into a problem at the end of step 6: "Game Interface JS Stock".
The problem: when I click on the card in the player's hand, I got a red "unauthorized move" warning in the window, instead of the expected output "on playCard 42" on the console.
I think it comes from a mismatch between this line in the tutorial:
and state 2 in states.inc.php, which has these two lines:
I got stuck on this for a while until I figured it out, so it's something to be aware of when following the tutorial.
I just recently started learning BGA Studio; I was following the Hearts tutorial to the letter, but run into a problem at the end of step 6: "Game Interface JS Stock".
The problem: when I click on the card in the player's hand, I got a red "unauthorized move" warning in the window, instead of the expected output "on playCard 42" on the console.
I think it comes from a mismatch between this line in the tutorial:
Code: Select all
if (this.checkAction('actPlayCard', true)) {Code: Select all
"possibleactions" => array( "playCard", "pass" ),
"transitions" => array( "playCard" => 2, "pass" => 2 )