Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Checkers.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

<p id="out-text"></p>

<select id="game_select" name="выбор игры">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Создал #53

<option value="" selected>выбери игру</option>
<option value="шахматы">шахматы</option>
<option value="шашки">шашки</option>
<option value="крестики нолики">крестики нолики</option>
</select>

<script type="text/python">
from browser import document, html, window
import enum
Expand Down Expand Up @@ -539,6 +546,14 @@
vis = GameVisualizerXO(g)
vis.RunNextStep()

def game_select_change(event):
document["out-text"].innerHTML = ""
selected = document["game_select"].value
if selected == "крестики нолики":
TestXO()
# elif selected == "шашки": ...
# elif selected == "шахматы": ...

def Test(event):
TestConvertCoordinates()
TestCreateArray2D()
Expand All @@ -552,8 +567,7 @@
myprint('Все тесты прошли без ошибок')

document["button__start_test"].bind("click", Test)

TestXO()
document["game_select"].bind("change", game_select_change)

</script>

Expand Down