Search found 8 matches

by Reyvolution
18 August 2026, 17:54
Forum: Developers
Topic: Hearts tutorial: setSelectionMode() to restrict playable cards list doesn't work as coded
Replies: 3
Views: 210

Re: Hearts tutorial: setSelectionMode() to restrict playable cards list doesn't work as coded

Well, I found a workaround: for some reason Number() works when parseInt() does not. It's also possible to tighten up the switch case to use one fewer variable. Here's what I ended up using: switch (stateName) { case "PlayerTurn": if (isCurrentPlayerActive) { // Visually limits available c...
by Reyvolution
18 August 2026, 17:39
Forum: Developers
Topic: Looking for jobs
Replies: 4
Views: 544

Re: Looking for jobs

Start here, it will give you some overview of using BGA Studio to get you started and has links to the 2 example game tutorials for Hearts and Reversi.
by Reyvolution
18 August 2026, 00:19
Forum: Developers
Topic: Hearts tutorial: setSelectionMode() to restrict playable cards list doesn't work as coded
Replies: 3
Views: 210

Re: Hearts tutorial: setSelectionMode() to restrict playable cards list doesn't work as coded

Thank you, that's helpful! I can see that if I pass an array of 'card' objects it works. And I can get the 'filter' function to work by passing integers instead of strings. I did this using map(parseInt) on my array of strings, and for some reason, some of the values will map to 'NaN' instead of an ...
by Reyvolution
16 August 2026, 23:42
Forum: Developers
Topic: Hearts tutorial: setSelectionMode() to restrict playable cards list doesn't work as coded
Replies: 3
Views: 210

Hearts tutorial: setSelectionMode() to restrict playable cards list doesn't work as coded

The good news is I survived the rest of the tutorial and have a working game. :P However, I couldn't get the client-side control for setSelectionMode() to work correctly. I'm following the code samples in the Rule Enforcements section: The server-side logic correctly determines playable cards in the...
by Reyvolution
13 August 2026, 19:32
Forum: Developers
Topic: Stuck on Hearts Tutorial: "Cannot read properties of undefined" in addCards loop for tableau
Replies: 3
Views: 271

Re: Stuck on Hearts Tutorial: "Cannot read properties of undefined" in addCards loop for tableau

Thank you; I ended up doing more line-by-line logging to the console and eventually figured out that I had the tableauStocks[player_id] reference in the wrong place. It was extra confusing because tableauStocks[player.id] (with a dot instead of underscore) worked fine in the same location. It seems ...
by Reyvolution
13 August 2026, 01:28
Forum: Developers
Topic: Stuck on Hearts Tutorial: "Cannot read properties of undefined" in addCards loop for tableau
Replies: 3
Views: 271

Re: Stuck on Hearts Tutorial: "Cannot read properties of undefined" in addCards loop for tableau

Just stepped through it again to confirm how it is failing: 1. Express Start game with 4 players --> Loads with initial hand dealt and an empty tableau 2. Switch to active player's view using the red arrow --> Loads with initial hand dealt and an empty tableau 3. Click a card from active player's ha...
by Reyvolution
13 August 2026, 01:14
Forum: Developers
Topic: Stuck on Hearts Tutorial: "Cannot read properties of undefined" in addCards loop for tableau
Replies: 3
Views: 271

Stuck on Hearts Tutorial: "Cannot read properties of undefined" in addCards loop for tableau

I've been following the current hearts tutorial ( https://en.doc.boardgamearena.com/Tutorial_hearts#Client_-_Server_Interactions ) and got through the steps right before the "cardswon" step. Things seemed to be working up until this point, but now after connecting the various state transit...
by Reyvolution
12 August 2026, 17:50
Forum: Developers
Topic: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts
Replies: 8
Views: 439

Re: Stuck at the "Game Interface with BGA Cards" - Adding Dependencies in Tutorial Hearts

I got stuck at a similar point even with the updated tutorial. Finally found the wiki page https://en.doc.boardgamearena.com/BgaCards (note the slug/search term had to be "BgaCards" instead of "bga-cards" as expected) and it included this important instruction: This line should b...

Go to advanced search