-- Part 4 mini-project: Number Guessing Game -- starter.
--
-- Finish this file so it plays a game of "guess the number".
-- See the chapter page for the full spec.
--
-- Run with: lua projects/03-number-guess/starter.lua

-- TODO: pick a random target between 1 and 100 (call math.random once).


-- TODO: declare an attempts counter, starting at 0.


print("I am thinking of a number between 1 and 100.")

-- TODO: declare a guess variable. It must exist BEFORE the repeat-until
-- loop so the `until` line can see it. A `local guess` with no value
-- works.


-- TODO: write a repeat ... until loop that:
--   1. increases attempts by 1,
--   2. prompts for a guess and reads it via tonumber(io.read()),
--   3. uses if/elseif/else to print "Too low.", "Too high.", or
--      "Correct! You got it in N attempts.",
--   4. exits when guess equals the target.

