Instead of having the is_powered parameter be a boolean on whether the machine is on or off, this makes it impossible to know whether the machine is brewing, heating or just off. I suggest we instead move it to be an integer, but with only three possible options:
Instead of having the
is_powered
parameter be a boolean on whether the machine is on or off, this makes it impossible to know whether the machine is brewing, heating or just off. I suggest we instead move it to be an integer, but with only three possible options:0
: Machine has no power1
: Machine is maintaining heat2
: Machine is brewing