Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update Pseudo.txt #4

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
20 changes: 17 additions & 3 deletions Pseudo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
On how to play Go Fish
Rules
Go Fish works using a simple deck of 52 cards. Each player has a hand, usually of five or seven cards. Each player takes turns, each turn asking if another player has a card or cards with a certain face value. If not, the asking player has to take another card. If the other player has the requested card, they must give all cards of that face value to the other player. If you have all four cards of a certain value, you may lay them down in a stack, face-up, which is called a book. Once all card values have been turned into books, the player with the most books wins.


BTW this cant actually work as two players needs to be an AI vs Player.
Pseudo Code
* Create deck
* Set two players
Expand All @@ -22,7 +21,22 @@ Pseudo Code
* 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!
* Player 1 may ask again //This means player 1 can ask over and over until you have to Go Fish!
boolean has=false;
boolean P1Turn=false
while(running){
P1Turn=true;
while(P1Turn){
if(has==false){
(probably have to create a draw function separately)
P1Turn=false;
}
else if(has==true){

}
}


* On player 2’s turn:
* Player 2 asks “Player 1, do you have any…”
* Insert the value of a card after that
Expand Down