Commit graph

25 commits

Author SHA1 Message Date
Simon Hausmann
c2a0cd7000 Added a node version of the memory puzzle game
This also implements a basic single shot timer support, which has
one caveat: it leaks the closures right now.
2020-12-11 17:17:28 +01:00
Simon Hausmann
cfe7455305 Switch the memory example to the simpler .60 import mechanism 2020-12-10 15:10:30 +01:00
Simon Hausmann
d2ecd539bd Style edits
Use longer but perhaps more descriptive names for the first tile of the
pair.
2020-12-10 15:02:41 +01:00
Olivier Goffart
c53f69d332 memory game in C++ 2020-12-10 13:09:21 +01:00
Simon Hausmann
21c5ddaf61 Synchronize code with the tutorial 2020-12-10 09:37:33 +01:00
Simon Hausmann
0b84f2c40e Unify the tile arrays
There's no "restart" etc. so for now the code is much simpler by having just one array.
2020-12-10 08:56:15 +01:00
Simon Hausmann
a366744f28 Sync code with tutorial 2020-12-09 15:04:40 +01:00
Simon Hausmann
ce2cfa022d Flip the boolean expression for the base memory tile color
Subjectively it's easier to read :)
2020-12-09 14:01:56 +01:00
Simon Hausmann
2398d00e6f Apply the wasm init simplifcation from the tutorial
The await wrapper is not needed
2020-12-09 13:52:20 +01:00
Olivier Goffart
d3a79e49f6 memory: attempt to simplify the logic slightly 2020-12-09 13:35:57 +01:00
Olivier Goffart
060dd655a5 Memory game: add the logo on the hidden tile 2020-12-08 20:21:56 +01:00
Olivier Goffart
0a1c9aa206 Fix the aspect ratio of images by keeping them square 2020-12-08 16:40:17 +01:00
Olivier Goffart
132ed8155d Respect the aspect ratio in the memory game 2020-12-08 16:37:20 +01:00
Olivier Goffart
dbd27f150d Memory: color scheme and size 2020-12-08 14:57:10 +01:00
Simon Hausmann
f77bdffc38 Prospective fix for aspect ratio preservation for the icons 2020-12-08 14:25:53 +01:00
Simon Hausmann
82d6a679f5 Show a different color for solved tiles 2020-12-08 13:40:29 +01:00
Olivier Goffart
2e5007da32 memory: fix the file name in the index.html 2020-12-08 13:24:48 +01:00
Olivier Goffart
d8680c33d0 Port more wasm example to the simplified wasm 2020-12-08 13:01:02 +01:00
Simon Hausmann
199ae5f9d3 Simplify wasm startup
It is not necessary to call main because it's marked to be called on "startup".
2020-12-08 12:18:52 +01:00
Simon Hausmann
39b8691819 Switch to generating the SVG icons using rsvg-convert
The npm package is not maintained anymore and does not support newer
font-awesome versions with additional icons.
2020-12-08 12:03:51 +01:00
Olivier Goffart
91dcf00897 Memory: Ssmall design change
- Add some padding
 - Better colors
 - rounded corners
2020-12-08 11:59:47 +01:00
Simon Hausmann
9ac4cd851b Open the memory tile from the center 2020-12-08 11:35:08 +01:00
Simon Hausmann
e602bc603a A wasm port for the memory puzzle without npm and webpack 2020-12-08 11:15:54 +01:00
Simon Hausmann
d471ed566f Fix tile positioning inside the window
Don't start at (0, 0) - leave some space
2020-12-08 10:39:26 +01:00
Simon Hausmann
574d17e698 Initial version of a small memory game
This is intended to form the basis for a tutorial.
2020-12-08 09:58:53 +01:00