Split InputInterface in two interfaces (input and output)
Currently, if no InputInterface is available, confirmAlert throws an Exception
This is problematic: several errors are possible before the HamsterGame is fully initialized (or the initialization is even forgotten). If an Exception is thrown, it is caught and an alert is shown, then the exception is thrown again. Problem: if not InputInterface is registered, the other exception is thrown and the original Exception is lost which makes debugging hard.
As a solution, the confirmAlert method should be part of a new OutputInterface. Some key aspects:
- confirmAlert is not blocking but async
- if one is confirmed (or aborted), every other request is also aborted (so that e.g. the user does not have to close the message box twice)
- maybe a timeout
- there should be at least one default OutputInterface which uses a default logger, however it should not confirm
Temporary fix: if no InputInterface is available, confirmAlert returns immediately and does nothing