Skip to content

PseudoCode is trash, git gud #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions Pseudo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ Go Fish works using a simple deck of 52 cards. Each player has a hand, usually o

Pseudo Code
* Create deck
* Set two players
* Distribute 5 cards from deck to both players
* Set amount players
* Distribute 5 cards from deck to all players
* On game start:
*Set turn to player 1
*Set turn to first
*Loop until end of game:
*When player 1’s turn ends, set turn to player 2
*When player 2’s turn ends, set turn to player 1
* On player 1’s turn:
* Player 1 asks “Player 2, do you have any…”
*When player x’s turn ends, set turn to player y, etc.
*When player y’s turn ends, set turn to next player.
* On player x’s turn:
* Player x asks “Player y, do you have any…”
* Insert the value of a card after that //Example: An ace, 10s, 4s…
* If Player 2 lacks the requested card(s):
* Player 2 says “Go Fish”
* Player 1 has to draw a card from the deck
* End player 1’s turn
* Else if Player 2 has requested card(s):
* Player 2 gives all requested card(s) to Player 1
* Player 1 may ask again //This means player 1 can ask over and over until you have to Go Fish!
* On player 2’s turn:
* Player 2 asks “Player 1, do you have any…”
* If Player y lacks the requested card(s):
* Player y says “Go Fish”
* Player x has to draw a card from the deck
* End player x’s turn
* Else:
* Player y gives all requested card(s) to Player x
* Player x may ask again //This means player x can ask over and over until you have to Go Fish!
* On player y’s turn:
* Player y asks “Player x, do you have any…”
* Insert the value of a card after that
* If Player 2 lacks the requested card(s):
* Player 1 says “Go Fish”
* Player 2 has to draw a card from the deck
* End player 2’s turn
* If Player 2 has requested card(s):
* Player 1 gives all requested card(s) to Player 1
* Player 2 may ask again
* If Player y lacks the requested card(s):
* Player x says “Go Fish”
* Player y has to draw a card from the deck
* End player y’s turn
* If Player y has requested card(s):
* Player x gives all requested card(s) to Player x
* Player y may ask again
* If any player holds 4 of the same card:
* That card is put down as a book, and that card value is essentially removed from the game
* If all books have been created:
* The player with the most cards wins
* The player with the most booked cards
* Game ends