Adding a feedback region to the Ludo Board
We add a feedback pane to the existing Board view.
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'.
Game already has an announcer, so we don;t need to add one.
We just define a new
Announcement subclass: #GtLudoBoardFeedbackUpdated
class (subclass of
Object subclass: #Announcement
), and a dedicated
self announcer announce: GtLudoBoardFeedbackUpdated new
method to be used in any method that generates feedback. (Actually, just the
feedback: method we see above.)