Adding a feedback region to the Ludo Board
TL;DR
We add a feedback pane to the existing Board view.
Feedback
We need a way to provide feedback to the user. We add a region at the bottom of the board.
Since there may be multiple views open, we store the feedback in the board, and issue an announcement when it is updated. The BoardElement subscribes to the Board's announcer, and the game simply updates the board's feedback when it need to.
game := GtLudoGame new.
game feedback: 'Feedback goes here'.
The Game
already has an announcer, so we don;t need to add one.
We just define a new GtLudoBoardFeedbackUpdated
class (subclass of Announcement
), and a dedicated GtLudoGame>>#notifyFeedbackUpdated
method to be used in any method that generates feedback. (Actually, just the feedback:
method we see above.)