Closed Eggrror404 closed 8 months ago
2 個 commit 就 +688 行了
怕
那原作者在2023寫著十年前的JS 我:??
@HeyLoon 你的2048
主要其實差不多了 剩顏色跟視覺上的東西需要調 還有看要怎麼插入在主頁
還有兩個TODO😭
還需要一個換大小的按鈕 但我不確定要放哪裡
預計要有 4x4 6x6 8x8 跟 自訂
先這樣
但目前 state 是由 2048.ts 發出 event
,再接上一個 store
,其實是挺怪的
既然是單純為了 Svelte 在做那就把 state
交給 Svelte Store
還有目前 DOM 元素的處理都在 2048.ts
雖然我是想把 HTML 的東西都放在 .svelte
處理,
但這樣目前還沒找到保留動畫的方法(因為不能直接拿每個方格做一個元素,這樣移動會把舊的刪掉、再加新的)
依託答辯 不大想合
先關掉了
之後是可以重新來看 但可能是放其他地方?
resolves https://github.com/tnfshcec/tnfshcec-web/issues/27
js game logic from https://medium.com/@aswingiftson007/2048-game-in-html-and-javascript-c6cc63d2698f 🙏🙏 ported to typescript & svelte
leaderboard to fill in the spaces(no sign in users by design, no leader board then)