Remove or update some outdated TODOs
This commit is contained in:
parent
687bf74979
commit
19ddae6273
|
@ -172,10 +172,8 @@ function Baserunning:pushNewBatter()
|
||||||
return new
|
return new
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param self table
|
|
||||||
---@param runnerIndex number
|
---@param runnerIndex number
|
||||||
function Baserunning:runnerScored(runnerIndex)
|
function Baserunning:runnerScored(runnerIndex)
|
||||||
-- TODO: outRunners/scoredRunners split
|
|
||||||
self.scoredRunners[#self.scoredRunners + 1] = self.runners[runnerIndex]
|
self.scoredRunners[#self.scoredRunners + 1] = self.runners[runnerIndex]
|
||||||
table.remove(self.runners, runnerIndex)
|
table.remove(self.runners, runnerIndex)
|
||||||
end
|
end
|
||||||
|
|
|
@ -49,12 +49,11 @@ function BoxScore.new(stats)
|
||||||
}, { __index = BoxScore })
|
}, { __index = BoxScore })
|
||||||
end
|
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 left and right through games that go into extra innings
|
||||||
-- * Scroll up and down through other stats.
|
-- * Scroll up and down through other stats.
|
||||||
-- + Balls and strikes
|
-- + Balls and strikes
|
||||||
-- + Batting average
|
-- + Batting average
|
||||||
-- + Graph of team scores over time
|
|
||||||
-- + Farthest hit ball
|
-- + Farthest hit ball
|
||||||
|
|
||||||
local MarginY <const> = 70
|
local MarginY <const> = 70
|
||||||
|
|
|
@ -8,7 +8,6 @@ local gfx = playdate.graphics
|
||||||
---@param image pd_image
|
---@param image pd_image
|
||||||
---@param drawInverted boolean
|
---@param drawInverted boolean
|
||||||
function maybeDrawInverted(image, x, y, drawInverted)
|
function maybeDrawInverted(image, x, y, drawInverted)
|
||||||
-- TODO: Bring logo up a pixel on the dark player base?
|
|
||||||
local drawMode = gfx.getImageDrawMode()
|
local drawMode = gfx.getImageDrawMode()
|
||||||
if drawInverted then
|
if drawInverted then
|
||||||
gfx.setImageDrawMode(gfx.kDrawModeInverted)
|
gfx.setImageDrawMode(gfx.kDrawModeInverted)
|
||||||
|
|
|
@ -13,7 +13,6 @@ function throwMeter:draw(x, y)
|
||||||
gfx.setLineWidth(1)
|
gfx.setLineWidth(1)
|
||||||
gfx.drawRect(x, y, 14, ThrowMeterHeight)
|
gfx.drawRect(x, y, 14, ThrowMeterHeight)
|
||||||
if self.lastReadThrow then
|
if self.lastReadThrow then
|
||||||
-- TODO: If meter has moved to a new fielder, empty it.
|
|
||||||
local ratio = 1
|
local ratio = 1
|
||||||
if not self.wasPerfect then
|
if not self.wasPerfect then
|
||||||
ratio = (self.lastReadThrow - throwMeter.MinCharge) / (self.idealPower - throwMeter.MinCharge)
|
ratio = (self.lastReadThrow - throwMeter.MinCharge) / (self.idealPower - throwMeter.MinCharge)
|
||||||
|
|
|
@ -157,9 +157,6 @@ function Fielding:updateFielderPositions(ball, deltaSeconds)
|
||||||
ball.heldBy = fielder -- How much havoc will this wreak?
|
ball.heldBy = fielder -- How much havoc will this wreak?
|
||||||
end
|
end
|
||||||
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
|
self.fielderHoldingBall = fielderHoldingBall
|
||||||
return fielderHoldingBall
|
return fielderHoldingBall
|
||||||
end
|
end
|
||||||
|
|
|
@ -299,7 +299,8 @@ end
|
||||||
|
|
||||||
---@param scoredRunCount number
|
---@param scoredRunCount number
|
||||||
function Game:score(scoredRunCount)
|
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.announcer:say("SCORE!")
|
||||||
self:checkForGameOver()
|
self:checkForGameOver()
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,7 +40,6 @@ end
|
||||||
|
|
||||||
local baseRunningSpeed = 25
|
local baseRunningSpeed = 25
|
||||||
|
|
||||||
--- TODO: Individual runner control.
|
|
||||||
---@param runner Runner
|
---@param runner Runner
|
||||||
---@param ball Point3d
|
---@param ball Point3d
|
||||||
---@return number
|
---@return number
|
||||||
|
|
Loading…
Reference in New Issue