Remove or update some outdated TODOs

This commit is contained in:
Sage Vaillancourt 2025-02-23 18:23:19 -05:00
parent 687bf74979
commit 19ddae6273
7 changed files with 3 additions and 11 deletions

View File

@ -172,10 +172,8 @@ function Baserunning:pushNewBatter()
return new
end
---@param self table
---@param runnerIndex number
function Baserunning:runnerScored(runnerIndex)
-- TODO: outRunners/scoredRunners split
self.scoredRunners[#self.scoredRunners + 1] = self.runners[runnerIndex]
table.remove(self.runners, runnerIndex)
end

View File

@ -49,12 +49,11 @@ function BoxScore.new(stats)
}, { __index = BoxScore })
end
-- TODO: Convert the box-score into a whole "scene"
-- TODO? Some other stats
-- * Scroll left and right through games that go into extra innings
-- * Scroll up and down through other stats.
-- + Balls and strikes
-- + Batting average
-- + Graph of team scores over time
-- + Farthest hit ball
local MarginY <const> = 70

View File

@ -8,7 +8,6 @@ local gfx = playdate.graphics
---@param image pd_image
---@param drawInverted boolean
function maybeDrawInverted(image, x, y, drawInverted)
-- TODO: Bring logo up a pixel on the dark player base?
local drawMode = gfx.getImageDrawMode()
if drawInverted then
gfx.setImageDrawMode(gfx.kDrawModeInverted)

View File

@ -13,7 +13,6 @@ function throwMeter:draw(x, y)
gfx.setLineWidth(1)
gfx.drawRect(x, y, 14, ThrowMeterHeight)
if self.lastReadThrow then
-- TODO: If meter has moved to a new fielder, empty it.
local ratio = 1
if not self.wasPerfect then
ratio = (self.lastReadThrow - throwMeter.MinCharge) / (self.idealPower - throwMeter.MinCharge)

View File

@ -157,9 +157,6 @@ function Fielding:updateFielderPositions(ball, deltaSeconds)
ball.heldBy = fielder -- How much havoc will this wreak?
end
end
-- TODO: The need is growing for a distinction between touching the ball and holding the ball.
-- Or, at least, fielders need to start *stopping* the ball when they make contact with it.
-- Right now, a line-drive *through* first will be counted as an out.
self.fielderHoldingBall = fielderHoldingBall
return fielderHoldingBall
end

View File

@ -299,7 +299,8 @@ end
---@param scoredRunCount number
function Game:score(scoredRunCount)
self:battingTeamCurrentInning().score = self:battingTeamCurrentInning().score + scoredRunCount
local battingTeamStats = self:battingTeamCurrentInning()
battingTeamStats.score = battingTeamStats.score + scoredRunCount
self.announcer:say("SCORE!")
self:checkForGameOver()
end

View File

@ -40,7 +40,6 @@ end
local baseRunningSpeed = 25
--- TODO: Individual runner control.
---@param runner Runner
---@param ball Point3d
---@return number