tnfshcec / tnfshcec-web

電機社社網
http://www.tnfshcec.com/
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

feat: 2048 game #32

Closed Eggrror404 closed 8 months ago

Eggrror404 commented 10 months ago

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

Eggrror404 commented 10 months ago

2 個 commit 就 +688 行了

Eggrror404 commented 10 months ago

那原作者在2023寫著十年前的JS 我:??

Eggrror404 commented 10 months ago

@HeyLoon 你的2048

主要其實差不多了 剩顏色跟視覺上的東西需要調 還有看要怎麼插入在主頁

Eggrror404 commented 10 months ago

還有兩個TODO😭

Eggrror404 commented 9 months ago

還需要一個換大小的按鈕 但我不確定要放哪裡

預計要有 4x4 6x6 8x8 跟 自訂

Eggrror404 commented 9 months ago

先這樣

但目前 state 是由 2048.ts 發出 event,再接上一個 store,其實是挺怪的 既然是單純為了 Svelte 在做那就把 state 交給 Svelte Store

還有目前 DOM 元素的處理都在 2048.ts 雖然我是想把 HTML 的東西都放在 .svelte 處理, 但這樣目前還沒找到保留動畫的方法(因為不能直接拿每個方格做一個元素,這樣移動會把舊的刪掉、再加新的)

Eggrror404 commented 9 months ago

依託答辯 不大想合

Eggrror404 commented 8 months ago

先關掉了

之後是可以重新來看 但可能是放其他地方?