-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses.py
More file actions
26 lines (23 loc) · 793 Bytes
/
Copy pathclasses.py
File metadata and controls
26 lines (23 loc) · 793 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
# This file contains the animal card class.
# A template for an animal card.
class Animal:
def __init__(self, name, attack, defense, cost, element):
self.name = name
self.attack = attack
self.defense = defense
self.cost = cost
self.element = element # Can be earth, water or air.
class Player:
def __init__(self, name):
name = name
self.hp = 5
self.front_deck = ['EMPTY'] * 4
self.back_deck = ['EMPTY'] * 4
self.hand = []
class Game:
def __init__(self):
self.deck = [] # Main deck
self.bunny_deck = [] # Bunny-only deck
self.players = [Player("Player 1"), Player("Player 2")]
self.turn = 0 # Track whose turn it is
self.time_limit = 30 # Seconds per turn