Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b08f835

Browse files
removed unused function
1 parent dca8103 commit b08f835

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

‎Board.py‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,6 @@ def __init__(self, position=None):
4646
for i in self.tigerPos:
4747
self.points[i].set_state("T")
4848

49-
def point_index(self, coord):
50-
# if an integer is passed, check if it's valid and return it
51-
if type(coord) == int:
52-
return coord
53-
54-
file, rank = coord
55-
56-
# check if the coordinates are valid
57-
assert len(coord) == 2 and file in list('ABCDE') and int(
58-
rank) in range(1, 6), "Invalid Coordinates: %s" % str(coord)
59-
60-
# Top left point on the board is A1
61-
# A1 = point[0], E5 = point[24]
62-
return (Point.File[file].value - 1) + (int(rank) - 1) * 5
63-
6449
def reset(self):
6550
"""Resets the board"""
6651

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /