ovos-skill-mill 0.1.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. ovos_skill_mill-0.1.0a1/LICENSE +201 -0
  2. ovos_skill_mill-0.1.0a1/PKG-INFO +137 -0
  3. ovos_skill_mill-0.1.0a1/README.md +111 -0
  4. ovos_skill_mill-0.1.0a1/__init__.py +59 -0
  5. ovos_skill_mill-0.1.0a1/boardgame.py +440 -0
  6. ovos_skill_mill-0.1.0a1/controlpanel.json +100 -0
  7. ovos_skill_mill-0.1.0a1/controlpanel.svg +1 -0
  8. ovos_skill_mill-0.1.0a1/engine.py +386 -0
  9. ovos_skill_mill-0.1.0a1/icon.png +0 -0
  10. ovos_skill_mill-0.1.0a1/icon.svg +1 -0
  11. ovos_skill_mill-0.1.0a1/locale/ca-ES/controlpanel.json +22 -0
  12. ovos_skill_mill-0.1.0a1/locale/ca-ES/mill.json +159 -0
  13. ovos_skill_mill-0.1.0a1/locale/ca-ES/mill_skill.voc +2 -0
  14. ovos_skill_mill-0.1.0a1/locale/ca-ES/play.intent +9 -0
  15. ovos_skill_mill-0.1.0a1/locale/ca-ES/skill.json +27 -0
  16. ovos_skill_mill-0.1.0a1/locale/da-DK/controlpanel.json +22 -0
  17. ovos_skill_mill-0.1.0a1/locale/da-DK/mill.json +160 -0
  18. ovos_skill_mill-0.1.0a1/locale/da-DK/mill_skill.voc +2 -0
  19. ovos_skill_mill-0.1.0a1/locale/da-DK/play.intent +10 -0
  20. ovos_skill_mill-0.1.0a1/locale/da-DK/skill.json +27 -0
  21. ovos_skill_mill-0.1.0a1/locale/de-DE/controlpanel.json +22 -0
  22. ovos_skill_mill-0.1.0a1/locale/de-DE/mill.json +158 -0
  23. ovos_skill_mill-0.1.0a1/locale/de-DE/mill_skill.voc +2 -0
  24. ovos_skill_mill-0.1.0a1/locale/de-DE/play.intent +9 -0
  25. ovos_skill_mill-0.1.0a1/locale/de-DE/skill.json +27 -0
  26. ovos_skill_mill-0.1.0a1/locale/en-US/controlpanel.json +22 -0
  27. ovos_skill_mill-0.1.0a1/locale/en-US/mill.json +160 -0
  28. ovos_skill_mill-0.1.0a1/locale/en-US/mill_skill.voc +4 -0
  29. ovos_skill_mill-0.1.0a1/locale/en-US/play.intent +12 -0
  30. ovos_skill_mill-0.1.0a1/locale/en-US/skill.json +27 -0
  31. ovos_skill_mill-0.1.0a1/locale/es-ES/controlpanel.json +22 -0
  32. ovos_skill_mill-0.1.0a1/locale/es-ES/mill.json +158 -0
  33. ovos_skill_mill-0.1.0a1/locale/es-ES/mill_skill.voc +2 -0
  34. ovos_skill_mill-0.1.0a1/locale/es-ES/play.intent +9 -0
  35. ovos_skill_mill-0.1.0a1/locale/es-ES/skill.json +27 -0
  36. ovos_skill_mill-0.1.0a1/locale/eu-ES/controlpanel.json +22 -0
  37. ovos_skill_mill-0.1.0a1/locale/eu-ES/mill.json +157 -0
  38. ovos_skill_mill-0.1.0a1/locale/eu-ES/mill_skill.voc +2 -0
  39. ovos_skill_mill-0.1.0a1/locale/eu-ES/play.intent +9 -0
  40. ovos_skill_mill-0.1.0a1/locale/eu-ES/skill.json +27 -0
  41. ovos_skill_mill-0.1.0a1/locale/fr-FR/controlpanel.json +22 -0
  42. ovos_skill_mill-0.1.0a1/locale/fr-FR/mill.json +158 -0
  43. ovos_skill_mill-0.1.0a1/locale/fr-FR/mill_skill.voc +2 -0
  44. ovos_skill_mill-0.1.0a1/locale/fr-FR/play.intent +9 -0
  45. ovos_skill_mill-0.1.0a1/locale/fr-FR/skill.json +27 -0
  46. ovos_skill_mill-0.1.0a1/locale/gl-ES/controlpanel.json +22 -0
  47. ovos_skill_mill-0.1.0a1/locale/gl-ES/mill.json +158 -0
  48. ovos_skill_mill-0.1.0a1/locale/gl-ES/mill_skill.voc +2 -0
  49. ovos_skill_mill-0.1.0a1/locale/gl-ES/play.intent +9 -0
  50. ovos_skill_mill-0.1.0a1/locale/gl-ES/skill.json +27 -0
  51. ovos_skill_mill-0.1.0a1/locale/it-IT/controlpanel.json +22 -0
  52. ovos_skill_mill-0.1.0a1/locale/it-IT/mill.json +157 -0
  53. ovos_skill_mill-0.1.0a1/locale/it-IT/mill_skill.voc +3 -0
  54. ovos_skill_mill-0.1.0a1/locale/it-IT/play.intent +10 -0
  55. ovos_skill_mill-0.1.0a1/locale/it-IT/skill.json +27 -0
  56. ovos_skill_mill-0.1.0a1/locale/nb-NO/controlpanel.json +22 -0
  57. ovos_skill_mill-0.1.0a1/locale/nb-NO/mill.json +158 -0
  58. ovos_skill_mill-0.1.0a1/locale/nb-NO/mill_skill.voc +2 -0
  59. ovos_skill_mill-0.1.0a1/locale/nb-NO/play.intent +9 -0
  60. ovos_skill_mill-0.1.0a1/locale/nb-NO/skill.json +27 -0
  61. ovos_skill_mill-0.1.0a1/locale/nl-NL/controlpanel.json +22 -0
  62. ovos_skill_mill-0.1.0a1/locale/nl-NL/mill.json +158 -0
  63. ovos_skill_mill-0.1.0a1/locale/nl-NL/mill_skill.voc +2 -0
  64. ovos_skill_mill-0.1.0a1/locale/nl-NL/play.intent +9 -0
  65. ovos_skill_mill-0.1.0a1/locale/nl-NL/skill.json +27 -0
  66. ovos_skill_mill-0.1.0a1/locale/pt-BR/controlpanel.json +22 -0
  67. ovos_skill_mill-0.1.0a1/locale/pt-BR/mill.json +158 -0
  68. ovos_skill_mill-0.1.0a1/locale/pt-BR/mill_skill.voc +2 -0
  69. ovos_skill_mill-0.1.0a1/locale/pt-BR/play.intent +9 -0
  70. ovos_skill_mill-0.1.0a1/locale/pt-BR/skill.json +27 -0
  71. ovos_skill_mill-0.1.0a1/locale/pt-PT/controlpanel.json +22 -0
  72. ovos_skill_mill-0.1.0a1/locale/pt-PT/mill.json +158 -0
  73. ovos_skill_mill-0.1.0a1/locale/pt-PT/mill_skill.voc +2 -0
  74. ovos_skill_mill-0.1.0a1/locale/pt-PT/play.intent +9 -0
  75. ovos_skill_mill-0.1.0a1/locale/pt-PT/skill.json +27 -0
  76. ovos_skill_mill-0.1.0a1/locale/sv-SE/controlpanel.json +22 -0
  77. ovos_skill_mill-0.1.0a1/locale/sv-SE/mill.json +158 -0
  78. ovos_skill_mill-0.1.0a1/locale/sv-SE/mill_skill.voc +2 -0
  79. ovos_skill_mill-0.1.0a1/locale/sv-SE/play.intent +9 -0
  80. ovos_skill_mill-0.1.0a1/locale/sv-SE/skill.json +27 -0
  81. ovos_skill_mill-0.1.0a1/ovos_skill_mill.egg-info/PKG-INFO +137 -0
  82. ovos_skill_mill-0.1.0a1/ovos_skill_mill.egg-info/SOURCES.txt +174 -0
  83. ovos_skill_mill-0.1.0a1/ovos_skill_mill.egg-info/dependency_links.txt +1 -0
  84. ovos_skill_mill-0.1.0a1/ovos_skill_mill.egg-info/entry_points.txt +2 -0
  85. ovos_skill_mill-0.1.0a1/ovos_skill_mill.egg-info/requires.txt +4 -0
  86. ovos_skill_mill-0.1.0a1/ovos_skill_mill.egg-info/top_level.txt +1 -0
  87. ovos_skill_mill-0.1.0a1/picture.py +150 -0
  88. ovos_skill_mill-0.1.0a1/pyproject.toml +46 -0
  89. ovos_skill_mill-0.1.0a1/screenshot-portrait.png +0 -0
  90. ovos_skill_mill-0.1.0a1/screenshot.png +0 -0
  91. ovos_skill_mill-0.1.0a1/setup.cfg +4 -0
  92. ovos_skill_mill-0.1.0a1/spoken_numbers.py +131 -0
  93. ovos_skill_mill-0.1.0a1/tests/test_boardgame.py +134 -0
  94. ovos_skill_mill-0.1.0a1/tests/test_engine.py +143 -0
  95. ovos_skill_mill-0.1.0a1/tests/test_locale.py +42 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: ovos-skill-mill
3
+ Version: 0.1.0a1
4
+ Summary: Mill (Nine Men's Morris) against Emkay by voice: place, move and take on points 1-24. With pictures. Made for Emkay, works on any OpenVoiceOS.
5
+ Author: emkay-voice
6
+ Maintainer: Andreas Lorensen
7
+ License: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/emkay-voice/ovos-skill-mill
9
+ Project-URL: Issues, https://github.com/emkay-voice/ovos-skill-mill/issues
10
+ Project-URL: Emkay, https://github.com/emkay-voice/emkay
11
+ Project-URL: Icon, https://raw.githubusercontent.com/emkay-voice/ovos-skill-mill/main/icon.png
12
+ Keywords: ovos,openvoiceos,skill,voice,assistant,game,board game,emkay,mill,nine mens morris,strategy
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Intended Audience :: End Users/Desktop
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Games/Entertainment :: Board Games
18
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: ovos-workshop<10.0.0,>=0.0.15
23
+ Provides-Extra: test
24
+ Requires-Dist: pytest; extra == "test"
25
+ Dynamic: license-file
26
+
27
+ # <img src='icon.png' card_color='#5B3A1E' width='50' height='50' style='vertical-align:bottom'/> Mill
28
+
29
+ **Mill (Nine Men's Morris) against Emkay, by voice.** Place your nine pieces, move them along the
30
+ lines, make mills and take Emkay's pieces. The points are numbered 1 to 24, so a move is just
31
+ *"7"* or *"from 7 to 8"*. Play on the screen – or on your own board, and move Emkay's pieces as it
32
+ says. Made for [Emkay](https://emkay.ai), works on any OpenVoiceOS.
33
+
34
+ <img src='screenshot.png' alt='Mill on a lying screen' height='300'/> <img src='screenshot-portrait.png' alt='Mill on a standing screen' height='300'/>
35
+
36
+ ## Examples
37
+
38
+ ```
39
+ "play Mill" "start Mill over"
40
+ "7" "place on 7" "from 7 to 8" "take 15"
41
+ "where are your pieces?" "where are mine?" "what was your move?"
42
+ "how many pieces?" "show the rules" "help"
43
+ "play an easy Mill" "play a hard Mill"
44
+ "stop playing"
45
+
46
+ "spil Mølle", "7", "fra 7 til 8", "tag 15", "hvor er dine brikker", "vis reglerne",
47
+ "stop spillet" (Danish)
48
+ ```
49
+
50
+ While you play, everything you say goes to the game first – before any other skill – until you
51
+ say *stop* or *stop playing* (the game is saved), or a few minutes pass in silence.
52
+
53
+ ## The rules
54
+
55
+ *"Show the rules"* puts them on the screen as a page of their own, and Emkay reads them. They are on
56
+ the skill's page in the control panel too.
57
+
58
+ - You play white, Emkay plays black, and you begin. The points are numbered 1 to 24, row by row:
59
+
60
+ ```
61
+ 1 ----------- 2 ----------- 3
62
+ | 4 ------ 5 ------ 6 |
63
+ | | 7 - 8 - 9 | |
64
+ 10 - 11 - 12 13 - 14 - 15
65
+ | | 16 - 17 - 18 | |
66
+ | 19 ------ 20 ----- 21 |
67
+ 22 ---------- 23 ---------- 24
68
+ ```
69
+
70
+ - First you each place nine pieces, one at a time, on empty points.
71
+ - Then you move a piece along a line to the next empty point.
72
+ - Three in a line is a **mill**: take one of the other's pieces – not one in a mill, unless all are.
73
+ - With three pieces left you may **fly** to any empty point.
74
+ - Fewer than three pieces, or no move, loses. Fifty moves without a piece taken is a draw.
75
+
76
+ ## Emkay's play
77
+
78
+ Emkay looks ahead with a minimax search (alpha-beta): one move on *easy* (and it often just grabs),
79
+ three on *normal*, five on *hard*, within a couple of seconds. It always closes a mill it can, and
80
+ blocks yours. On the screen its last move is marked: a gold ring where it went, a dashed line from
81
+ where it came, and a red cross where it took one of your pieces.
82
+
83
+ ## On a real board
84
+
85
+ Have a mill board at home? Play on it: say your moves, and move Emkay's pieces as it says
86
+ (*"I move from 4 to 5. Mill! I take your piece on 12."*). The screen shows the board as Emkay sees
87
+ it, numbered, so you can check that the two boards agree. Ask *"where are your pieces?"* if in doubt.
88
+
89
+ ## "Play ..." and OCP
90
+
91
+ OpenVoiceOS lets its media player (OCP) answer every *play ...*. So Mill is a common play skill
92
+ too: when OCP searches for "Mill", the skill answers with the game (`MediaType.GAME`), and OCP hands
93
+ it over. When the game ends, OCP is told, so *pause*, *next* and *play* are the music's again.
94
+
95
+ ## Saved as you go
96
+
97
+ After every turn the game is saved – on the device, and with My Emkay for your other devices too.
98
+ *Stop playing*, and *play Mill* goes on where you were. *Start Mill over* starts again.
99
+
100
+ ## Pictures
101
+
102
+ A wooden board with its three squares and every point numbered, glossy white and black pieces, the
103
+ pieces still to place beside it, and whose turn it is. One plain SVG, so it shows on every screen,
104
+ the Mark II's too. On a standing screen – Emkay on a phone – the board stands too. There is no
105
+ background music: it is a game to think in.
106
+
107
+ ## Settings
108
+
109
+ In the control panel (*Mill*, under Everyday): the game on now or the saved one, start it on the
110
+ device, start over, stop – and **Show pictures** and **Layout** (`auto`, `portrait`, `landscape`).
111
+
112
+ ## For developers
113
+
114
+ The rules and Emkay's play (`engine.py`) are plain Python with no OVOS in it:
115
+ `Game(new_game(), words).handle("from 7 to 8")`. The game is a small dict that is saved as JSON.
116
+ The words of each language are in `locale/<lang>/mill.json`; spoken numbers in every language are in
117
+ `spoken_numbers.py`. `boardgame.py` is what every board game of emkay-voice does the same way – OCP,
118
+ converse, stop, saving, the rules page, the screen and the control panel – and is the same file in
119
+ all of them.
120
+
121
+ ## Languages
122
+
123
+ Catalan, Danish, Dutch, English, French, Galician, German, Italian, Norwegian (bokmål), Portuguese
124
+ (Brazil and Portugal), Spanish, Swedish and Basque. Everything except English and Danish is machine
125
+ translated and only loosely read through by a native Dane – corrections are very welcome.
126
+
127
+ ## Category
128
+
129
+ **Entertainment**
130
+
131
+ ## Tags
132
+
133
+ #game #boardgame #mill #strategy #emkay
134
+
135
+ ## License
136
+
137
+ Apache-2.0. Made by [emkay-voice](https://github.com/emkay-voice), maintained by Andreas Lorensen.
@@ -0,0 +1,111 @@
1
+ # <img src='icon.png' card_color='#5B3A1E' width='50' height='50' style='vertical-align:bottom'/> Mill
2
+
3
+ **Mill (Nine Men's Morris) against Emkay, by voice.** Place your nine pieces, move them along the
4
+ lines, make mills and take Emkay's pieces. The points are numbered 1 to 24, so a move is just
5
+ *"7"* or *"from 7 to 8"*. Play on the screen – or on your own board, and move Emkay's pieces as it
6
+ says. Made for [Emkay](https://emkay.ai), works on any OpenVoiceOS.
7
+
8
+ <img src='screenshot.png' alt='Mill on a lying screen' height='300'/> <img src='screenshot-portrait.png' alt='Mill on a standing screen' height='300'/>
9
+
10
+ ## Examples
11
+
12
+ ```
13
+ "play Mill" "start Mill over"
14
+ "7" "place on 7" "from 7 to 8" "take 15"
15
+ "where are your pieces?" "where are mine?" "what was your move?"
16
+ "how many pieces?" "show the rules" "help"
17
+ "play an easy Mill" "play a hard Mill"
18
+ "stop playing"
19
+
20
+ "spil Mølle", "7", "fra 7 til 8", "tag 15", "hvor er dine brikker", "vis reglerne",
21
+ "stop spillet" (Danish)
22
+ ```
23
+
24
+ While you play, everything you say goes to the game first – before any other skill – until you
25
+ say *stop* or *stop playing* (the game is saved), or a few minutes pass in silence.
26
+
27
+ ## The rules
28
+
29
+ *"Show the rules"* puts them on the screen as a page of their own, and Emkay reads them. They are on
30
+ the skill's page in the control panel too.
31
+
32
+ - You play white, Emkay plays black, and you begin. The points are numbered 1 to 24, row by row:
33
+
34
+ ```
35
+ 1 ----------- 2 ----------- 3
36
+ | 4 ------ 5 ------ 6 |
37
+ | | 7 - 8 - 9 | |
38
+ 10 - 11 - 12 13 - 14 - 15
39
+ | | 16 - 17 - 18 | |
40
+ | 19 ------ 20 ----- 21 |
41
+ 22 ---------- 23 ---------- 24
42
+ ```
43
+
44
+ - First you each place nine pieces, one at a time, on empty points.
45
+ - Then you move a piece along a line to the next empty point.
46
+ - Three in a line is a **mill**: take one of the other's pieces – not one in a mill, unless all are.
47
+ - With three pieces left you may **fly** to any empty point.
48
+ - Fewer than three pieces, or no move, loses. Fifty moves without a piece taken is a draw.
49
+
50
+ ## Emkay's play
51
+
52
+ Emkay looks ahead with a minimax search (alpha-beta): one move on *easy* (and it often just grabs),
53
+ three on *normal*, five on *hard*, within a couple of seconds. It always closes a mill it can, and
54
+ blocks yours. On the screen its last move is marked: a gold ring where it went, a dashed line from
55
+ where it came, and a red cross where it took one of your pieces.
56
+
57
+ ## On a real board
58
+
59
+ Have a mill board at home? Play on it: say your moves, and move Emkay's pieces as it says
60
+ (*"I move from 4 to 5. Mill! I take your piece on 12."*). The screen shows the board as Emkay sees
61
+ it, numbered, so you can check that the two boards agree. Ask *"where are your pieces?"* if in doubt.
62
+
63
+ ## "Play ..." and OCP
64
+
65
+ OpenVoiceOS lets its media player (OCP) answer every *play ...*. So Mill is a common play skill
66
+ too: when OCP searches for "Mill", the skill answers with the game (`MediaType.GAME`), and OCP hands
67
+ it over. When the game ends, OCP is told, so *pause*, *next* and *play* are the music's again.
68
+
69
+ ## Saved as you go
70
+
71
+ After every turn the game is saved – on the device, and with My Emkay for your other devices too.
72
+ *Stop playing*, and *play Mill* goes on where you were. *Start Mill over* starts again.
73
+
74
+ ## Pictures
75
+
76
+ A wooden board with its three squares and every point numbered, glossy white and black pieces, the
77
+ pieces still to place beside it, and whose turn it is. One plain SVG, so it shows on every screen,
78
+ the Mark II's too. On a standing screen – Emkay on a phone – the board stands too. There is no
79
+ background music: it is a game to think in.
80
+
81
+ ## Settings
82
+
83
+ In the control panel (*Mill*, under Everyday): the game on now or the saved one, start it on the
84
+ device, start over, stop – and **Show pictures** and **Layout** (`auto`, `portrait`, `landscape`).
85
+
86
+ ## For developers
87
+
88
+ The rules and Emkay's play (`engine.py`) are plain Python with no OVOS in it:
89
+ `Game(new_game(), words).handle("from 7 to 8")`. The game is a small dict that is saved as JSON.
90
+ The words of each language are in `locale/<lang>/mill.json`; spoken numbers in every language are in
91
+ `spoken_numbers.py`. `boardgame.py` is what every board game of emkay-voice does the same way – OCP,
92
+ converse, stop, saving, the rules page, the screen and the control panel – and is the same file in
93
+ all of them.
94
+
95
+ ## Languages
96
+
97
+ Catalan, Danish, Dutch, English, French, Galician, German, Italian, Norwegian (bokmål), Portuguese
98
+ (Brazil and Portugal), Spanish, Swedish and Basque. Everything except English and Danish is machine
99
+ translated and only loosely read through by a native Dane – corrections are very welcome.
100
+
101
+ ## Category
102
+
103
+ **Entertainment**
104
+
105
+ ## Tags
106
+
107
+ #game #boardgame #mill #strategy #emkay
108
+
109
+ ## License
110
+
111
+ Apache-2.0. Made by [emkay-voice](https://github.com/emkay-voice), maintained by Andreas Lorensen.
@@ -0,0 +1,59 @@
1
+ # Copyright 2026 emkay-voice
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Mill (Nine Men's Morris) against Emkay, by voice.
16
+
17
+ "Play Mill" - you play white, Emkay plays black. The points are numbered 1
18
+ to 24, row by row, as on the screen: say "7" to place a piece, "from 7 to 8"
19
+ to move one, and after a mill which of Emkay's pieces you take. Emkay says
20
+ its moves - play on the screen, or on your own board and move Emkay's pieces
21
+ as it says. Easy, normal and hard. The game is saved as you go - also for
22
+ your other devices with My Emkay. Made for Emkay, works on any OpenVoiceOS."""
23
+ from .boardgame import BoardGameSkill, normalize
24
+ from .engine import Game, count, new_game
25
+ from .picture import compose
26
+
27
+
28
+ class MillSkill(BoardGameSkill):
29
+ WORDS = "mill.json"
30
+ VOC = "mill_skill"
31
+ BUS = "mill"
32
+ URI = "mill:game"
33
+ ICON = "https://raw.githubusercontent.com/emkay-voice/ovos-skill-mill/main/icon.png"
34
+ BACKGROUND = "#17110c"
35
+
36
+ def _level(self, utterance):
37
+ said = f" {normalize(utterance)} "
38
+ for name, spoken in self._words().get("levels", {}).items():
39
+ if any(f" {normalize(w)} " in said for w in spoken):
40
+ return name
41
+ return None
42
+
43
+ def wants_new(self, utterance):
44
+ return bool(utterance) and self._level(utterance) is not None
45
+
46
+ def new_game(self, utterance=""):
47
+ return new_game(self._level(utterance) or "normal")
48
+
49
+ def make_game(self, g):
50
+ return Game(g, self._words())
51
+
52
+ def picture(self, game, portrait):
53
+ return compose(game.g, game.words, game.words["title"], portrait=portrait)
54
+
55
+ def panel_status(self, g):
56
+ human, emkay = g["human"], "b" if g["human"] == "w" else "w"
57
+ you = count(g["board"], human) + g["hand"][human]
58
+ me = count(g["board"], emkay) + g["hand"][emkay]
59
+ return {"pieces": f"{you} – {me}", "level": g["level"]}