diff --git a/src/baserunning.lua b/src/baserunning.lua index 3e914be..e9094f9 100644 --- a/src/baserunning.lua +++ b/src/baserunning.lua @@ -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 diff --git a/src/draw/box-score.lua b/src/draw/box-score.lua index f6fcced..2fd8c72 100644 --- a/src/draw/box-score.lua +++ b/src/draw/box-score.lua @@ -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 = 70 diff --git a/src/draw/player.lua b/src/draw/player.lua index 393d219..93f1ce2 100644 --- a/src/draw/player.lua +++ b/src/draw/player.lua @@ -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) diff --git a/src/draw/throw-meter.lua b/src/draw/throw-meter.lua index 44502cc..b77f176 100644 --- a/src/draw/throw-meter.lua +++ b/src/draw/throw-meter.lua @@ -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) diff --git a/src/fielding.lua b/src/fielding.lua index 716b172..c892415 100644 --- a/src/fielding.lua +++ b/src/fielding.lua @@ -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 diff --git a/src/main.lua b/src/main.lua index 499dd17..16862a0 100644 --- a/src/main.lua +++ b/src/main.lua @@ -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 diff --git a/src/npc.lua b/src/npc.lua index 4bb1af9..533450c 100644 --- a/src/npc.lua +++ b/src/npc.lua @@ -40,7 +40,6 @@ end local baseRunningSpeed = 25 ---- TODO: Individual runner control. ---@param runner Runner ---@param ball Point3d ---@return number