Skip to content

Commit 377509d

Browse files
committed
Initial working game
1 parent a00a4d5 commit 377509d

File tree

4 files changed

+473
-0
lines changed

4 files changed

+473
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Mastermind game 🧙‍
2+
3+
A quick and dirty Mastermind single-player game implementation.
4+
5+
https://scmx.github.io/mastermind
6+
7+
The computer opponent decides on a code and you make guesses as to what the code
8+
is. When you've made a guess for all positions on a row, you instantly get the
9+
results and move on to the next row unless you just won. :tada:
10+
11+
![screenshot](mastermind.jpg)
12+
13+
## Technologies
14+
- Modern JavaScript (but no transpilation)
15+
- CSS flexbox
16+
- [Hyperapp](https://github.com/hyperapp/hyperapp) - JavaScript
17+
micro-framework with virtual DOM, state management
18+
19+
## References
20+
- https://en.wikipedia.org/wiki/Mastermind_(board_game)
21+
22+
## Gotchas
23+
- Bad UI and UX
24+
- No tests
25+
- Big ugly view component
26+
- No JSX, used `h('div', {}, [...])` instead to try it out :unamused:
27+
- Very cheatable
28+
- Soon to be an intentionally abandoned side project
29+
30+
## Challenges for you
31+
- Write your own version?
32+
- Write a two-player version?
33+
- Move opponent logic to a server to remove ability to cheat?
34+
- Write an isomorphic game server that can be run either in node or in the
35+
browser?

hyperapp-v1.1.2.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)