-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameState.py
More file actions
31 lines (27 loc) · 859 Bytes
/
gameState.py
File metadata and controls
31 lines (27 loc) · 859 Bytes
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
# -*- coding: utf-8 -*-
import cv2
import numpy as np
class GameState:
def __init__(self):
self.playerHand = []
self.rivalBoard = []
self.playerBoard = []
self.tracked_cards = []
#Player Methods
def displayHand(self):
print(self.playerHand)
def addToHand(self, card):
if card is not None:
self.playerHand.append(card)
def removeFromHand(self, card):
if card in self.playerHand:
self.playerHand.remove(card)
#Game Board Methods
def displayBoard(self):
print("Rival: ",self.rivalBoard, "\n Your Board: ", self.playerBoard)
def addToRival(self, card):
if card is not None:
self.rivalBoard.append(card)
def addToPlayer(self, card):
if card is not None:
self.playerBoard.append(card)