更新 player.lua

This commit is contained in:
2025-12-21 05:36:03 +08:00
parent 07d81eb43b
commit 949c380104

View File

@@ -31,7 +31,7 @@ local function drawFrame(frame, term)
-- 计算图像的尺寸
-- 假设所有行具有相同的长度,取第一行的长度作为图像宽度
local imageWidth, imageHeight = #frame[1][1], #frame
local imageWidth, imageHeight = #frame[1][1] - 1, #frame
-- 计算居中的x和y偏移量
local xOffset = math.max(math.floor((termWidth - imageWidth) / 2), 0)