forked from sapire/Battleship-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HumanPlayer.py
30 lines (20 loc) · 1.03 KB
/
HumanPlayer.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
from IPlayer import IPlayer
class HumanPlayer(IPlayer):
def __init__(self, name: str, controller):
IPlayer.__init__(self, name, controller)
def get_move(self): # delete if unnecessary
pass
def place_submarine(self, submarine, location):
return super().place_submarine(submarine, location)
# return self.player_board.place_submarine_on_board(submarine, location)
# def place_submarine(self, submarine, location):
# # display message 'Please place all your ships on the board. Ships cannot be on top of each other. All ships
# # must be placed before the game can begin'
# # show Carrier (5 tiles) to player, the ship should follow the mouse of the player's cursor
# # when the user clicks, the submarine should be placed
# # move on to place the next submarine until none are left
# pass
def get_score(self):
score = 1000
# for every miss, the player loses 100 points
# for every hit, the player gains 300 points