Skip to content

Commit 78bb037

Browse files
feat: new menu (#200)
* feat: refactor of the menu to have a proper page Signed-off-by: Thomas Mauran <thomasmauran@yahoo.com> * docs: update the example gifs Signed-off-by: Thomas Mauran <thomasmauran@yahoo.com> * chore: lint --------- Signed-off-by: Thomas Mauran <thomasmauran@yahoo.com>
1 parent 19a10cf commit 78bb037

22 files changed

+1070
-356
lines changed

examples/demo-two-player.gif

45.2 KB
Loading

examples/demo-two-player.tape

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,64 +15,63 @@ Set WindowBarSize 40
1515
Type "cargo run" Sleep 500ms Enter
1616

1717
Sleep 0.7s
18-
Down @0.3s
19-
Down @0.3s
20-
Down @0.3s
21-
Down @0.3s
22-
Down @0.3s
23-
Down @0.3s
24-
Down @0.3s
25-
Down @0.3s
26-
Space @0.3s
18+
# Navigate to "Play Game" (index 0) - already selected, just press Enter
19+
Space @0.5s
2720
Sleep 1.5s
2821

29-
Down @0.3s
30-
Down @0.3s
31-
Space @0.3s
22+
# Now in Game Mode Menu, "Local Game" (index 0) is selected
23+
# Press Enter to start (no form needed)
24+
Space @0.5s
3225
Sleep 0.7s
33-
Space @0.3s
3426

27+
# Now playing the game - make some moves
28+
Down @0.5s
29+
Down @0.5s
30+
Space @0.5s
3531
Sleep 0.7s
36-
Left @0.3s
37-
Space @0.3s
32+
Space @0.5s
33+
34+
Sleep 0.7s
35+
Left @0.5s
36+
Space @0.5s
3837
Sleep 0.7s
39-
Space @0.3s
38+
Space @0.5s
4039

41-
Down @0.3s
42-
Space @0.3s
40+
Down @0.5s
41+
Space @0.5s
4342
Sleep 0.7s
44-
Space @0.3s
43+
Space @0.5s
4544
Sleep 0.7s
4645

47-
Right @0.3s
48-
Right @0.3s
49-
Right @0.3s
50-
Space @0.3s
46+
Right @0.5s
47+
Right @0.5s
48+
Right @0.5s
49+
Space @0.5s
5150
Sleep 0.7s
52-
Space @0.3s
51+
Space @0.5s
5352
Sleep 0.7s
5453

55-
Left @0.3s
56-
Space @0.3s
54+
Left @0.5s
55+
Space @0.5s
5756
Sleep 0.7s
58-
Right @0.3s
59-
Right @0.3s
60-
Space @0.3s
57+
Right @0.5s
58+
Right @0.5s
59+
Space @0.5s
6160
Sleep 0.7s
6261

63-
Up @0.3s
64-
Right @0.3s
65-
Right @0.3s
66-
Space @0.3s
62+
Up @0.5s
63+
Right @0.5s
64+
Right @0.5s
65+
Space @0.5s
6766
Sleep 0.7s
68-
Space @0.3s
67+
Space @0.5s
6968
Sleep 0.7s
7069

7170

72-
Up @0.3s
73-
Up @0.3s
74-
Up @0.3s
75-
Space @0.3s
71+
Up @0.5s
72+
Up @0.5s
73+
Up @0.5s
74+
Space @0.5s
7675
Sleep 0.7s
77-
Space @0.3s
76+
Space @0.5s
7877
Sleep 0.7s

examples/helper.gif

20.7 KB
Loading

examples/helper.tape

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ Down @0.3s
1919
Down @0.3s
2020
Down @0.3s
2121
Down @0.3s
22-
Down @0.3s
23-
Down @0.3s
2422
Space @0.3s
2523
Sleep 1s
2624

examples/lichess-menu.gif

27.3 KB
Loading

examples/lichess-menu.tape

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,26 @@ Type "cargo run" Sleep 500ms Enter
1616

1717
Sleep 2s
1818

19-
# Navigate to Lichess menu (option 2, index 2)
20-
Down @0.3s
21-
Down @0.3s
22-
Space @0.3s
19+
# Navigate to "Play on Lichess" (index 1)
20+
Down @0.5s
21+
Space @0.5s
2322

2423
Sleep 2s
2524

2625
# Navigate through Lichess menu options
2726
# Show "Seek Game" option
2827
Sleep 1s
2928

30-
# Navigate to "Puzzle" option
31-
Down @0.3s
29+
Down @0.5s
3230
Sleep 1s
3331

34-
# Navigate to "My Ongoing Games" option
35-
Down @0.3s
32+
Down @0.5s
3633
Sleep 1s
3734

38-
# Navigate to "Join by Code" option
39-
Down @0.3s
35+
Down @0.5s
4036
Sleep 1s
4137

42-
# Go back up to show "Puzzle" option
43-
Up @0.3s
38+
Up @0.5s
4439
Sleep 1s
4540

4641
# Show the menu for a bit longer to see the stats panel
156 KB
Loading

examples/play_against_black_bot.tape

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,57 @@ Set WindowBarSize 40
1515
Type "cargo run" Sleep 500ms Enter
1616

1717
Sleep 2s
18-
Down @0.3s
19-
Down @0.3s
20-
Down @0.3s
21-
Space @0.3s
18+
# Navigate to "Play Game" (index 0) - already selected
19+
Space @0.5s
2220
Sleep 0.7s
2321

24-
Right @0.3s
25-
Space @0.3s
22+
# Now in Game Mode Menu, navigate to "Play Bot" (index 2)
23+
Right @0.5s
24+
Right @0.5s
25+
Space @0.5s
2626
Sleep 0.7s
2727

28-
Down @0.3s
29-
Down @0.3s
30-
Space @0.3s
28+
# Form is now active, cursor is on Color field (index 0)
29+
# Select Black (press Right to toggle to Black)
30+
Right @0.5s
31+
Space @0.5s
3132
Sleep 0.7s
32-
Space @0.3s
3333

34+
# Now on Bot Depth field (index 1), adjust depth
35+
Right @0.5s
36+
Space @0.5s
3437
Sleep 0.7s
35-
Right @0.3s
36-
Space @0.3s
37-
Sleep 0.7s
38-
Space @0.3s
3938

39+
# Start game
40+
Space @0.5s
4041
Sleep 0.7s
41-
Right @0.3s
42-
Space @0.3s
42+
43+
# Now playing - make some moves
44+
Down @0.5s
45+
Down @0.5s
46+
Space @0.5s
4347
Sleep 0.7s
44-
Space @0.3s
48+
Space @0.5s
4549

4650
Sleep 0.7s
47-
Left @0.3s
48-
Left @0.3s
49-
Left @0.3s
50-
Left @0.3s
51-
Left @0.3s
52-
Space @0.3s
51+
Right @0.5s
52+
Space @0.5s
53+
Sleep 0.7s
54+
Space @0.5s
55+
5356
Sleep 0.7s
54-
Space @0.3s
57+
Right @0.5s
58+
Space @0.5s
5559
Sleep 0.7s
60+
Space @0.5s
5661

62+
Sleep 0.7s
63+
Left @0.5s
64+
Left @0.5s
65+
Left @0.5s
66+
Left @0.5s
67+
Left @0.5s
68+
Space @0.5s
69+
Sleep 0.7s
70+
Space @0.5s
71+
Sleep 0.7s
-63.7 KB
Loading

examples/play_against_white_bot.tape

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,69 +15,80 @@ Set WindowBarSize 40
1515
Type "cargo run" Sleep 0.7s Enter
1616

1717
Sleep 2s
18-
Down @0.3s
19-
Down @0.3s
20-
Down @0.3s
21-
Space @0.3s
18+
# Navigate to "Play Game" (index 0) - already selected
19+
Space @0.5s
2220
Sleep 0.7s
23-
Space @0.3s
21+
22+
# Now in Game Mode Menu, navigate to "Play Bot" (index 2)
23+
Right @0.5s
24+
Right @0.5s
25+
Space @0.5s
26+
Sleep 0.7s
27+
28+
# Form is now active, cursor is on Color field (index 0)
29+
# Select White (already default, but confirm with Enter)
30+
Space @0.5s
2431
Sleep 0.7s
2532

26-
Down @0.3s
27-
Down @0.3s
28-
Space @0.3s
33+
# Now on Bot Depth field (index 1), adjust depth
34+
Right @0.5s
35+
Space @0.5s
2936
Sleep 0.7s
30-
Space @0.3s
37+
38+
# Start game
39+
Space @0.5s
3140
Sleep 0.7s
3241

33-
Down @0.3s
34-
Space @0.3s
42+
# Now playing - make some moves
43+
Down @0.5s
44+
Down @0.5s
45+
Space @0.5s
3546
Sleep 0.7s
36-
Space @0.3s
47+
Space @0.5s
3748
Sleep 0.7s
3849

39-
Up @0.3s
40-
Space @0.3s
50+
Up @0.5s
51+
Space @0.5s
4152
Sleep 0.7s
42-
Space @0.3s
53+
Space @0.5s
4354
Sleep 0.7s
4455

45-
Up @0.3s
46-
Left @0.3s
47-
Space @0.3s
56+
Up @0.5s
57+
Left @0.5s
58+
Space @0.5s
4859
Sleep 0.7s
49-
Space @0.3s
60+
Space @0.5s
5061
Sleep 0.7s
5162

52-
Up @0.3s
53-
Left @0.3s
54-
Space @0.3s
63+
Up @0.5s
64+
Left @0.5s
65+
Space @0.5s
5566
Sleep 0.7s
56-
Right @0.3s
57-
Space @0.3s
67+
Right @0.5s
68+
Space @0.5s
5869
Sleep 0.7s
5970

60-
Left @0.3s
61-
Down @0.3s
62-
Space @0.3s
71+
Left @0.5s
72+
Down @0.5s
73+
Space @0.5s
6374
Sleep 0.7s
64-
Space @0.3s
75+
Space @0.5s
6576
Sleep 0.7s
6677

67-
Left @0.3s
68-
Space @0.3s
78+
Left @0.5s
79+
Space @0.5s
6980
Sleep 0.7s
70-
Space @0.3s
81+
Space @0.5s
7182
Sleep 0.7s
7283

73-
Left @0.3s
74-
Up @0.3s
75-
Space @0.3s
84+
Left @0.5s
85+
Up @0.5s
86+
Space @0.5s
7687
Sleep 0.7s
77-
Space @0.3s
88+
Space @0.5s
7889
Sleep 0.7s
7990

8091
Sleep 1.5s
8192
Type "h"
8293

83-
Sleep 5s
94+
Sleep 5s

0 commit comments

Comments
 (0)