mirror of
https://github.com/sigmasternchen/html-tictactoe
synced 2025-03-14 19:18:55 +00:00
cleanup: Fix code style issue with get_id method
This commit is contained in:
parent
0e6ef6f3a2
commit
73be2de2ca
3 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
Loading…
Reference in a new issue