MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

Checker_game_by_dz/modules/pieces.py:14–26  ·  view source on GitHub ↗
(self, row, col, color)

Source from the content-addressed store, hash-verified

12 outline = 2
13
14 def __init__(self, row, col, color):
15 self.row = row
16 self.col = col
17 self.color = color
18 self.king = False
19
20 """if (self.color == yellow):
21 self.direction = -1
22 else:
23 self.direction = 1"""
24
25 self.x = self.y = 0
26 self.calculate_pos()
27
28 # calculate the positions
29 def calculate_pos(self):

Callers

nothing calls this directly

Calls 1

calculate_posMethod · 0.95

Tested by

no test coverage detected