Skip to content

Commit

Permalink
Merge pull request #1907 from xushiwei/q
Browse files Browse the repository at this point in the history
llgo demo tetris fix
  • Loading branch information
xushiwei authored Jun 27, 2024
2 parents 4f928a6 + 46d231a commit 7e48659
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions testdata/_llgo/tetris/tetris.gop
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func keyPressed(key c.Int) bool {
raylib.initWindow SCREENWIDTH, SCREENHEIGHT, c"tetris (powered by raylib and Go+)"
raylib.setTargetFPS 60
genShape

for !raylib.windowShouldClose && !gameOver {
fallTime += raylib.getFrameTime
if fallTime >= fallSpeed {
Expand Down Expand Up @@ -161,10 +162,10 @@ for !raylib.windowShouldClose && !gameOver {
BLOCK_SIZE-1, BLOCK_SIZE-1, curShape.Color
}

c.Sprintf(scoreText, c"Score:%d", score)
raylib.DrawText(scoreText, 10, 10, 20, raylib.BLACK)
c.sprintf scoreText, c"Score:%d", score
raylib.drawText scoreText, 10, 10, 20, raylib.BLACK

raylib.EndDrawing()
raylib.endDrawing
}

for !raylib.windowShouldClose {
Expand Down

0 comments on commit 7e48659

Please sign in to comment.