Page 1 of 1

99 (Trick Taking Card game)

Posted: 02 May 2020, 22:36
by QuasarDuke
99 is a trick-taking game for 3 players where the goal is to guess the exact amount of tricks you will win. The catch is that in order to bid, you have to remove cards from your hand! Each suit represents a different number, and the sum represents your bid. It's played with a subset of the 52 cards: 6-A. For extra points, declare your bid or reveal your hand - but if you bid incorrectly, your opponents get your bonus points!

There are a few scoring variants I've implemented:
- Game ends after 9 hands
- Game ends after 3 rounds (a round is when a player hits 100 pts)
- Game ends once a player has won 3 rounds

And three game variants:
- Standard
- Junk the Joker (trump is decided by how many players correctly made their bid in the previous round)
- Junk the Joker with an initial no trump hand (trump is decided by how many players correctly made their bid in the previous round)

Here are the rules: https://www.parlettgames.uk/oricards/ninety9.html

BGA reviewers can ca get access to the game here: https://boardgamearena.com/reviewer). If you don't meet the conditions to become a reviewer, you can also message me directly for access to the game if you would like to try it out.

ninetynine.jpg
ninetynine.jpg (193.03 KiB) Viewed 1837 times

Please let me know what you think!

Thanks,
Eric

Re: 99 (Trick Taking Card game)

Posted: 03 May 2020, 09:29
by yoyote
Hi, the game
http://boardgamearena.com/2/ninetynine?table=81553935 is blocked. A bug has been open.
Can you have a look ?

Edit : game ended by een, thx.

Re: 99 (Trick Taking Card game)

Posted: 07 May 2020, 15:49
by LaszloK
Hi Eric,

I skim-reviewed the current snapshot of your game.php and states.inc.php - didn't go too in depth (e.g. never wrapped my head around the functions doing scoring etc). Here are the few things I found:

states.inc.php:
- You have a few "game" states with a description. Those won't be displayed but will be flagged up as untranslated by projectcheck. It's probably best to just use an empty description. (BTW, did you use projectcheck? If not, you can find it on the "Manage game" page. It was quite useful for me.)
- Line 92: Use ${you} to get the word "You" coloured (for consistency with other games & some of the other states).
- State 14 "checkBids": is a no-op, you could drop it. Less traffic on the wire and in the DB.
- State 30 "nextTrick": same thing. There's one line in the state method, which you could put just before the transition at the end of the previous state... but in fact it looks like you're already doing it at the END of every trick anyway, so you won't even need it at the beginning provided that it's initialized correctly at the start of the game.

game.php:
- Lines 958 and 966: Testing the same thing so the 2nd one is effectively dead code. I'm sure that's not what you meant.
- (Lots of places) nextState(""): you can just nextState() if there's only one transition (in which case you don't even need to name the transition in states.inc.php).
- Line 1102: I've seen this double notification hack elsewhere, but it's not really necessary. You can use just one, in conjunction with a setTimeout on the JS side, to achieve the same result. (Again, less traffic on the wire and in DB. Also a more consistent UX over flakey connections.)
- Line 1128: looks dodgy to me, how is "first player" moving around as the trick is played out? Did you really mean this?

Hope this helps :)
Cheers
Laszlo

PS. Looks like a very fun game, btw. Are you planning to implement 4/5p?

Re: 99 (Trick Taking Card game)

Posted: 11 May 2020, 02:53
by QuasarDuke
states.inc.php:
- You have a few "game" states with a description. Those won't be displayed but will be flagged up as untranslated by projectcheck. It's probably best to just use an empty description. (BTW, did you use projectcheck? If not, you can find it on the "Manage game" page. It was quite useful for me.)
I did run projectcheck. They probably were not flagged because all the descriptions are surrounded by clienttranslate.
- Line 92: Use ${you} to get the word "You" coloured (for consistency with other games & some of the other states).
Thanks! Done
- State 14 "checkBids": is a no-op, you could drop it. Less traffic on the wire and in the DB.
Done
- State 30 "nextTrick": same thing. There's one line in the state method, which you could put just before the transition at the end of the previous state... but in fact it looks like you're already doing it at the END of every trick anyway, so you won't even need it at the beginning provided that it's initialized correctly at the start of the game.
Done

game.php:
- Lines 958 and 966: Testing the same thing so the 2nd one is effectively dead code. I'm sure that's not what you meant.
Huh. I didn't notice that. Thanks for finding it.
- (Lots of places) nextState(""): you can just nextState() if there's only one transition (in which case you don't even need to name the transition in states.inc.php).
Fixed
- Line 1102: I've seen this double notification hack elsewhere, but it's not really necessary. You can use just one, in conjunction with a setTimeout on the JS side, to achieve the same result. (Again, less traffic on the wire and in DB. Also a more consistent UX over flakey connections.
That's probably because it's in the hearts tutorial. Done
- Line 1128: looks dodgy to me, how is "first player" moving around as the trick is played out? Did you really mean this?
That's because I switched the meaning of 'first player' as I was building it. It's more accurately named 'currentPlayer'. Updated.
Looks like a very fun game, btw. Are you planning to implement 4/5p?
Thanks! It's one of my favorite card games. Implementing 4 players is on the eventual todo list, but I want to get 3 players out the door first.