forked from brendan-lomax/go-fish-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_card_game.py
75 lines (58 loc) · 1.83 KB
/
my_card_game.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Rename this file to the name of your game and delete this comment
# Names: Nymphaea, Fahad, Christine, Yiisam, Dylan, Brendon, Daniella
# Date: 7/26/2023
# Import statements
from card import Card
import random
# Program your game here!
# Name is either player or Computer
# Hand is the cards that the user has
# Quartets are basically points
#shows the structure of the player
class Player():
def __init__(self, name, hand, quartets=0):
self.name = name
self.hand = hand
self.quartets = quartets
# Computer player and their mover
#
class Computer(Player):
def move(self, deck):
return None
# Human and their move
class Human(Player):
def move(self, deck):
# TODO: Take in user input twice
# First time to ask who to ask about the card you want to ask about
# Second input will be the card number you want to ask about
return None
def create_deck():
deck = Card.new_deck()
return deck
# Give each player 7 cards to start with
def give_hand(deck):
user = deck[0:7]
THECOMP = deck[7:14]
SecondaryComp = deck[14:21]
TheLastComp = deck[21:28]
Actualdeck = deck[28:52]
# Splice deck into 5 lists, 4 is the hands of each player, and last will be the actual "deck"
def next_turn(current_turn):
print("The turn right now is: " + current_turn)
if current_turn == "user":
return "user"
if current_turn == "THECOMP":
return "THECOMP"
if current_turn == "THECOMP":
return "SecLastComp"
if current_turn == "SecLastComp":
return "TheLastComp"
if current_turn == "TheLastComp":
return "user"
def player_move():
if comupter
def go_fish(): # This is the main function return eNone
# Code that runs when script is called from terminal
# ex: python my_card_game.py
if __name__ == "__main__":
go_fish()