Skip to content

Commit

Permalink
Update gaviota.py
Browse files Browse the repository at this point in the history
refactor with chain constant value assignment to make code more Pythonic, concise and efficient.
  • Loading branch information
anonymousdouble authored Jan 1, 2024
1 parent 615a21b commit 2b754a2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions chess/gaviota.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def init_flipt() -> List[List[int]]:


def init_pp48_idx() -> Tuple[List[List[int]], List[int], List[int]]:
MAX_I = 48
MAX_J = 48
MAX_I = MAX_J = 48
idx = 0
pp48_idx = [[-1] * MAX_J for _ in range(MAX_I)]
pp48_sq_x = [NOSQUARE] * MAX_PP48_INDEX
Expand All @@ -170,9 +169,7 @@ def init_pp48_idx() -> Tuple[List[List[int]], List[int], List[int]]:


def init_ppp48_idx() -> Tuple[List[List[List[int]]], List[int], List[int], List[int]]:
MAX_I = 48
MAX_J = 48
MAX_K = 48
MAX_I = MAX_J = MAX_K = 48
ppp48_idx = [[[-1] * MAX_I for _ in range(MAX_J)] for _ in range(MAX_K)]
ppp48_sq_x = [NOSQUARE] * MAX_PPP48_INDEX
ppp48_sq_y = [NOSQUARE] * MAX_PPP48_INDEX
Expand Down

0 comments on commit 2b754a2

Please sign in to comment.