It is a nice UX, but with a fatal flaw: Tiles are supposed to be free when there is a side free, but you instead have it coded to be free when the top or bottom is free. Your app, your rules, so if you intended to do that, cool. It is just a fundamental divergence from how other implementations do it.
If you rotate it so the board looks like the traditional solitaire layout, the direction of free tiles is horizontal as it's supposed to be. But then the images on the tiles are rotated 90 degrees. Either way you look at it, something is non-standard.
The other thing is that this implementation doesn't seem to support overlapping tiles, which is kind of important. For instance, the topmost tile should overlap and block all four tiles under it.
Thanks for mentioning this. I played a little bit and I felt like it was the opposite of what I'd remembered. I do like that the inaccessible tiles are faded somewhat so that I don't inadvertently try to match them.
> Tiles are supposed to be free when there is a side free
No.
According to wikipedia[1]: "A tile is said to be open or exposed if it can be moved either left or right without disturbing other tiles.". Also look at the photo in the wikipedia article[2]. This implementation looks correct to me.
Back in college, while majoring in CS, I had a rough time dealing with semicolons, typos, missed characters while coding.
I thought to myself "I wonder if playing Mahjong in the Windows games would help me get better at scanning code and finding these types of errors". So I tried it and, lo and behold, it did.
Also, in this day and age of LLMs writing a lot of the code, scanning for missing semicolons in code sounds like "I was great at fixing telegraphs!"
I think this is a good example of what CSS can do and probably was not easy to make but I will likely stick with Mahjong that comes with most Linux distributions as they follow rules that people I may end up playing against would know and they have many layouts. I could see this being applied to other things however such as games that require building or repairing something. Or something similar to Minecraft?
If I click fast enough on mobile it starts trying to select/highlight text, should be able to prevent that with CSS too. I find this is somehow a common issue that separates a lot of PWAs from real apps, the browser text engine is still lurking there in the background trying to recall us all to the glory days of hypermedia
There are some super weird bugs, sometimes only one of the two pieces are removed and sometimes the field goes blank? Also on every move the faves change?! iOS here. And yeah, no majiang, but still super cool! Nostalgic vibes waiting for my fries and playing the Photo Play touch screen gambling machine (after unlocking it by tapping the words photo and play on the logo with two different fingers and entering the code)
This is pretty cool. I like the look and the gameplay. Though playing on mobile, some of the roatation gestures caused the page to refesh on me a couple of times since they triggered the browser's "drag down to refresh" interaction
There's some CSS properties specifically for doing 3D, yeah. You use perspective and perspective-origin to create the view frustum, and then CSS transforms to place your elements in 3D space.
codingdave|7 days ago
jasperry|7 days ago
The other thing is that this implementation doesn't seem to support overlapping tiles, which is kind of important. For instance, the topmost tile should overlap and block all four tiles under it.
rpdillon|7 days ago
rofko|7 days ago
thih9|7 days ago
No.
According to wikipedia[1]: "A tile is said to be open or exposed if it can be moved either left or right without disturbing other tiles.". Also look at the photo in the wikipedia article[2]. This implementation looks correct to me.
[1]: https://en.wikipedia.org/wiki/Mahjong_solitaire
[2]: https://en.wikipedia.org/wiki/Mahjong_solitaire#/media/File:...
rdescartes|7 days ago
gchamonlive|7 days ago
slowly lowers right hand in awkward silence
alexpotato|7 days ago
Back in college, while majoring in CS, I had a rough time dealing with semicolons, typos, missed characters while coding.
I thought to myself "I wonder if playing Mahjong in the Windows games would help me get better at scanning code and finding these types of errors". So I tried it and, lo and behold, it did.
Also, in this day and age of LLMs writing a lot of the code, scanning for missing semicolons in code sounds like "I was great at fixing telegraphs!"
sanj|7 days ago
uean|7 days ago
Bender|7 days ago
Impressive work!
rafabulsing|7 days ago
Discussion: https://news.ycombinator.com/item?id=44100148
koolala|7 days ago
haunter|7 days ago
Which makes me wonder which ruleset would be the easiest to implement. Probably MCR or HK, riichi has too many edge cases and sepcial rules and yakus.
snvzz|7 days ago
akersten|7 days ago
koolala|7 days ago
https://en.wikipedia.org/wiki/Mahjong_Tiles_(Unicode_block)
rofko|7 days ago
thenthenthen|7 days ago
aranw|7 days ago
rofko|7 days ago
Minor49er|7 days ago
rofko|7 days ago
DuncanCoffee|7 days ago
omoikane|7 days ago
snvzz|7 days ago
Instead, it is some solitaire using mahjong pieces.
socalgal2|7 days ago
https://en.wikipedia.org/wiki/Mahjong
Beautifully made though.
What I liked about the first one I saw in the 80s was the cascading shadows. Admittedly they were more important for 2d version
https://www.uvlist.net/game-18516-Shanghai#gallery-1
https://www.youtube.com/watch?v=b-pH0mnqCYM&t=337s
koolala|7 days ago
HardwareLust|7 days ago
koolala|7 days ago
rofko|7 days ago
TazeTSchnitzel|7 days ago
tejonutella|7 days ago
lieblingautor|6 days ago
soni96pl|7 days ago
user3939382|7 days ago
thenthenthen|7 days ago
jsmo|7 days ago
alexb_|7 days ago
apresmoi|7 days ago
pverheggen|7 days ago
overflyer|7 days ago
koolala|7 days ago