--
You received this message because you are subscribed to the Google Groups "object-composition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/object-composition/3014b669-249a-4cbd-b0ee-1cd79e507323n%40googlegroups.com.
Would it maybe make sense to invent a role in this case that doesn't necessarily exist in real life? e.g. GameOfficiant or GameMaster. I suppose there could actually be such a person in real life if you wanted someone to keep an eye on both players and make sure they're playing by the rules, haha. I think that in some games (just speaking generally here and not about DCI in particular), that role has been referred to as just "the computer".
I'm not so sure about the RestartButton role; it seems that the
only role-specific behavior it has is announcing the game start,
which could be done by just calling the announceGameStart method
of the InfoSpace role that you already have.
You mentioned that player1 and player2 are roles, but I don't see them as roles in the code...?
Cheers,
Matt
To view this discussion on the web visit https://groups.google.com/d/msgid/object-composition/da01d598-feee-4027-92be-a71f6d19450fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/object-composition/45f24478-f488-4fd1-a8ac-718ed6a7118dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/object-composition/02e3633f-c39a-45b3-bd44-1148028ed60bn%40googlegroups.com.
On 27 May 2023, at 06.00, Samuel Abiassi <samuel....@gmail.com> wrote:As for the player1 and player2 role, this was my biggest problem: right now, the two have no methods bounded to their role, and still, they are quite obviously present in my mental model of the context. So my question would be: should a Role always come with methods attached to it, or can a role be also a contextualization of the object in the particular context it is used on?