This project was made for an assignment using C++ and SFML. The game displays one digital clock and 3 analogue ones and the user is tasked with selecting which one displays the time on the digital one. All clocks update real-time.

After selection the game lets the player know whether the choice was correct or not.


The clocks are initialised with random time values, then one analogue clock is picked to initialise the digital clock.

While this could have been achieved with an overloaded assignment operator, since the initialisation function was already available to achieve the same result, that would have been unnecessary extra work.

On the other hand, I wanted to show my tutor my ability to use operator overloading, so I did implement it when comparing time values.

This is inherited from the Clock parent class, so can be used for both anaglogClock, and digitalClock.
Comments