TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: I made a sliding puzzle game

3 点作者 mpetrovich超过 2 年前
Inspired by another recent puzzle game [1] and bored at home while sick with the stomach flu, I decided to create a mobile-friendly version of the sliding-tile puzzle game that I once played as a kid.<p>How to play:<p>1. Tap a square to move it to the empty square.<p>2. Repeat until you&#x27;ve unscrambled the image.<p>Options:<p>- Allow swapping: Any image square can be moved to the empty square. (Easier)<p>- Only sliding: Only image squares that are directly adjacent to the empty square can be moved. (Harder)<p>Created in a day with React and the Unsplash random image API. Of course, that Unsplash API happens to be returning 503s at the moment of this submission, so I&#x27;ve manually added about 20 images for now.<p>It was a fun toy project, but I&#x27;d love to hear any feedback or suggestions. It&#x27;s open source on GitHub [2] if you&#x27;d like to read and critique my shitty JS :P<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33718124" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33718124</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;mpetrovich&#x2F;tileslide" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mpetrovich&#x2F;tileslide</a>

1 comment

amadeuspagel超过 2 年前
Nice. Have you thought about adding arrow keys?
评论 #33754782 未加载