# How to make a Go-fish game system

**URL:** <https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866>\
**Category:** ChoiceScript Help\
**Created:** [December 1, 2018, 11:10am UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866 "2018-12-01T11:10:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenith8](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zenith8/32/57853_2.png) [@zenith8](https://forum.choiceofgames.com/u/zenith8)\
**Post date:** [December 1, 2018, 11:10am UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/1 "2018-12-01T11:10:56Z")

</div>

So in my game I have a 3 player game involving the MC and two other npcs as they play a round of Go-Fish (and other card games) but I have no idea how to code it, some help would be nice! The NPCs are Samuel and Myano

What I wrote so far:

> \*temp card1  
> \*set card1 = 100  
> \*temp players  
> \*set players = 2  
> \*page\_break
> 
> Choose a player!
> 
> \*choice  
> #Samuel  
> Samuel grins at this.  
> \*goto label round1  
> #Myano  
> Myano meows excitedly to the jingle of the Meow-Mix cat-food ad.  
> \*goto label round1
> 
> \*label round1  
> if (myano\_friendship = true)  
> elseif

---

<div class="post-metadata">

**Author:** ![Delliot](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/delliot/32/60504_2.png) [@Delliot](https://forum.choiceofgames.com/u/Delliot)\
**Post date:** [December 1, 2018, 8:20pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/2 "2018-12-01T20:20:30Z")

</div>

That seems very complicated. I started thinking about it and then gave up, though I’m sure someone like @Szaal could come up with something.

I think your best bet would be to find another Choicescript game that includes a card game, open up the code, and learn from that.

I did find this thread that has some thoughts on the subject: [Dumb questions from noobs like me](https://forum.choiceofgames.com/t/dumb-questions-from-noobs-like-me/26019/10)

Alternatively, do you have to make the card game actually playable? You could absolutely write a scene that fakes it without going to the trouble of simulating the deck.

Even from your example, it seems like your intent is more the “hanging out with friends” angle than taking the player through an accurate rendition of Go Fish. You could still include actions like drawing cards, calling Go Fish, etc, and just prescript the outcomes, or predicate them on other stat checks.

Edit: Here’s a thread where Rachel made one, though the files are no longer available: [Hit Me - Blackjack Dealer](https://forum.choiceofgames.com/t/hit-me-blackjack-dealer/9972)

---

<div class="post-metadata">

**Author:** ![Carlos.R](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/carlos.r/32/75837_2.png) [@Carlos.R](https://forum.choiceofgames.com/u/Carlos.R)\
**Post date:** [December 1, 2018, 8:23pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/3 "2018-12-01T20:23:04Z")

</div>

I have experience in making card games in ChoiceScript if you want to hire me. Check out my game for samples of what I can do. 😉

---

<div class="post-metadata">

**Author:** ![Avery\_Moore](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/avery_moore/32/57275_2.png) [@Avery\_Moore](https://forum.choiceofgames.com/u/Avery_Moore)\
**Post date:** [December 1, 2018, 11:21pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/4 "2018-12-01T23:21:23Z")

</div>

> [@Carlos.R](#):
>
> I have experience in making card games in ChoiceScript if you want to hire me. Check out my game for samples of what I can do. 😉

I was just about to suggest you actually. (Was really impressed with some of the games you made in Missing Wings. I can’t even begin to get my head around the amount of coding that must’ve gone into the Connect 4 game.) 😊

---

<div class="post-metadata">

**Author:** ![Carlos.R](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/carlos.r/32/75837_2.png) [@Carlos.R](https://forum.choiceofgames.com/u/Carlos.R)\
**Post date:** [December 1, 2018, 11:46pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/5 "2018-12-01T23:46:50Z")

</div>

Thank you, that means a lot! 💟

---

<div class="post-metadata">

**Author:** ![zenith8](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zenith8/32/57853_2.png) [@zenith8](https://forum.choiceofgames.com/u/zenith8)\
**Post date:** [December 2, 2018, 2:39pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/6 "2018-12-02T14:39:18Z")

</div>

How does this script look?

> \*temp player\_draw  
> \*temp opponent\_draw  
> \*temp player\_lock “”  
> \*temp opponent\_lock “”  
> \*temp player\_total 0  
> \*temp opponent\_total 0  
> \*temp gofishTotalScore “”  
> \*page\_break
> 
> \*label gofish  
> Choose a player!
> 
> \*choice  
> #Samuel  
> Samuel grins at this.  
> \*set npc1 true  
> \*goto round1
> 
> \*label round1  
> \*page\_break  
> As ${name} draws a card, you wait patiently for your rival to draw their next card…  
> \*page\_break  
> You click to pick up your next card…  
> \*rand player\_draw 1 21  
> \*rand opponent\_draw 1 21  
> \*goto gofishTotalScore
> 
> \*label gofishTotalScore  
> \*if (player\_draw \>= 21)  
> Since you are at 21 you hold and wait for ${npc1}'s turn.  
> \*page\_break  
> \*goto round2
> 
> ```
> *elseif (player_lock) true
> Having stood at your [b]${player_total}[/b], you wait for ${npc1}'s move.
> *goto round2
> 
> *set player_total + player_draw
> You drew [b]${player_draw}[/b] in this round.
> *line_break
> *goto round2
> Your current amount: [b]${player_total}[/b].
> 
> ```
> 
> \*if (player\_draw \<= 21)  
> Since you are at less than 21 you hold and wait for your opponent’s turn.  
> \*set player\_lock true  
> \*page\_break  
> \*goto round2
> 
> \*label round2  
> \*if (opponent\_draw \>= 21)  
> Since ${npc1} is at 21, they hold and wait for ${name}'s turn.  
> \*page\_break  
> \*goto round3
> 
> ```
> *elseif (opponent_lock) true
> Since ${npc1} is at [b]less than 21[/b], ${npc1} wait for ${name}'s move.
> *page_break
> *set opponent_total + opponent_draw
> ${npc1} drew [b]${opponent_draw}[/b] in this round.
> *page_break
> 
> ```
> 
> \*if (opponent\_draw \<= 21)  
> Since ${npc1} is at less than 21 they hold and wait for ${name}'s move.  
> \*set opponent\_lock true  
> \*page\_break  
> \*goto round3
> 
> \*label round3  
> ${name}'s current amount: ${player\_total}  
> \*if (player\_draw \<= 21)  
> Since you are at less than 21 you hold and wait for your opponent’s turn.  
> \*page\_break  
> \*goto finalround
> 
> ```
> *elseif (player_lock) true
> Having stood at [b]${player_total}[/b], you wait for ${npc1}'s move.
> *page_break
> *set player_total + player_draw
> You drew [b]${player_draw}[/b] in this round, ${name}! Your total is ${player_total}!
> *goto finalround
> 
> ```
> 
> \*label finalround  
> \*if (player\_total \>= opponent\_total)  
> ${name}: ${player\_total}  
> ${npc1}: ${opponent\_total}  
> ${name} has won the game!  
> \*page\_break  
> Would you like to try again, ${name}?
> 
> \*choice  
> #Yes  
> Then let’s begin!  
> \*goto gofish
> 
> #No  
> Ok, everyone’s tired of Gofish, ${name}…  
> \*goto\_scene dorms
> 
> \*elseif (opponent\_total \>= player\_total)  
> ${name}: ${player\_total}  
> ${npc1}: ${opponent\_total}  
> ${npc1} has won the game!  
> \*page\_break  
> Would you like to try again, ${name}?
> 
> \*choice  
> #Yes  
> Then let’s begin!  
> \*goto gofish
> 
> #No  
> Ok, everyone’s tired of Gofish, ${name}…  
> \*goto\_scene dorms

But then it comes up with errors such as:

> Since true is at **less than 21** they hold and wait for Lance’s move.  
> **Lance’s current amount** : 0 Since you are at **less than 21** you hold and wait for your opponent’s turn.  
> **Lance:** 0 **true:** 0 Lance has won the game!

---

<div class="post-metadata">

**Author:** ![Carlos.R](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/carlos.r/32/75837_2.png) [@Carlos.R](https://forum.choiceofgames.com/u/Carlos.R)\
**Post date:** [December 2, 2018, 3:17pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/7 "2018-12-02T15:17:24Z")

</div>

Here are the rules of Go-Fish according to Bicycle playing cards:

> **[Go Fish – Card Game Rules](https://bicyclecards.com/how-to-play/go-fish/)**
>
> Learn how to ditch the line and go fish with the kids, via playing cards.

Also, you sent me a private message saying “I’ll send you the code for my gofish card game and I’ll hire you.” but we never talked about payment or payment method, numbers of hours, price per hour, or if this was going to be billed per project (in this case it would be one project). I also don’t know if you are legally able to enter into a contractually binding relationship, in other words, are you over 18? With respect, too many red flags have been raised for me so I’m going to have to withdraw my offer, but I wish you luck. You can do it if you put your mind to it!

---

<div class="post-metadata">

**Author:** ![zenith8](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zenith8/32/57853_2.png) [@zenith8](https://forum.choiceofgames.com/u/zenith8)\
**Post date:** [December 2, 2018, 3:18pm UTC](https://forum.choiceofgames.com/t/how-to-make-a-go-fish-game-system/46866/9 "2018-12-02T15:18:56Z")

</div>

I am over 18+. That’s all I’ll say. And thank you for your reply.
