cleanup: Fix code style issue with get_id method

This commit is contained in:
sigmasternchen 2024-11-02 16:13:47 +01:00
parent 0e6ef6f3a2
commit 73be2de2ca
3 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ def get_taunt(board, outcome):
def render_board(prefix, old_board, board, outcome):
with open("output/" + prefix + old_board.getId() + ".html", "w") as file:
with open("output/" + prefix + old_board.get_id() + ".html", "w") as file:
file.write(
template.render(
board=board,
@ -50,7 +50,7 @@ def generate_options(prefix, old_board, board, outcome):
future = board.apply(move)
response, outcome = calculate_best_move(future)
print(board.getId(), move, response)
print(board.get_id(), move, response)
generate_options(
prefix,

View file

@ -98,7 +98,7 @@ class Board:
return DRAW
def getId(self):
def get_id(self):
id = 0
for y in range(3):
for x in range(3):

View file

@ -25,7 +25,7 @@
{%- elif winner != -1 -%}
 
{%- else -%}
<a href={{ prefix }}{{ board.apply(Move(x, y)).getId() }}.html>?</a>
<a href={{ prefix }}{{ board.apply(Move(x, y)).get_id() }}.html>?</a>
{%- endif -%}
</td>
{%- endfor -%}