-
Notifications
You must be signed in to change notification settings - Fork 20
/
Game.py
42 lines (35 loc) · 1.08 KB
/
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
#################################################
#
# Game specification for the RPSFramework
#
# Created by Matt Martorana + Justin Read
#
#################################################
import Observer
class Game (Observer.Observer):
def num_players_per_game(self):
"""
Number of players in a game. Default setting is two-player games
:return:
"""
return 2
def get_result(self, moves):
"""
Computes the result for the given moves.
:param moves: A tuple containing the moves made by the players
:return: a tuple containing the result for the players
"""
# child of this class will have to figure out how win/loss/tie
# is determined moves
#
# Don't forget an elimination process if move is illegal
#
# @return array of points given to each player
pass
def is_legal(self, move):
"""
Checks if a given move is legal
:param move: given move
:return: True if the move is legal, false otherwise
"""
pass