B4Coder

🏏 Cricket Scoreboard · Mission 4 of 8

☝️ Out!

OUT! The scoreboard must show wickets: how many batters are out. And a batter who's out can't score any more: the scorer must be told.

Your mission

  1. OUT (ball.kind == "out"): the striker's out = true, and it was a ball they faced (balls + 1).
  2. A batter who's already out can't score or be out again: ok = false, and a message naming them.
  3. wickets = how many batters are out (count them in the loop that adds the total). ok = true for every ball that's allowed.

Getting the mission ready…