Skip to content

Commit 892b0ed

Browse files
committed
✨ (2048): add you win and continue logic
1 parent 7832f3c commit 892b0ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

internal/layout/action_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (g *GameLayout) restartGame() {
8585
g.isContinue = false
8686
}
8787

88-
// continueGame -
88+
// continueGame - 繼續遊戲把 isPlayerWin 的狀態 reset 成 false, isContinue 標記起來
8989
func (g *GameLayout) continueGame() {
9090
g.isPlayerWin = false
9191
g.isContinue = true

internal/layout/layout.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ func (g *GameLayout) drawYouWin(screen *ebiten.Image) {
148148
g.drawContinueButton(screen)
149149
}
150150

151+
// drawContinueButton - 畫出 Continue Button
151152
func (g *GameLayout) drawContinueButton(screen *ebiten.Image) {
152-
// 畫 Restart 按鈕
153+
// 畫 Continue 按鈕
153154
vector.DrawFilledRect(screen,
154155
float32(continueButtonRect.Min.X),
155156
float32(continueButtonRect.Min.Y),

0 commit comments

Comments
 (0)