-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOtherPlayer.py
29 lines (23 loc) · 940 Bytes
/
OtherPlayer.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
from GameObject import GameObject, Brain
from EyeBall import EyeBall
class OtherPlayer(EyeBall):
"""Class to model another player in multiplayer - child class of EyeBall."""
def __init__(self, nickname, position, direction, color, object_hash = None):
"""Initialize another player in multiplayer game.
Positional Arguments:
nickname - nickname of new other player
position - initial position in maze: tuple of (vertical_offset, horizontal_offset)
direction - initial direction
color - object's color as (r, g, b) tuple
Keyword Arguments:
object_hash - specific object_hash when cloning from server (default is to generate one)
"""
GameObject.__init__(
self,
nickname,
position,
direction,
color = color,
remote_object = True,
object_hash = object_hash
)