Visitor pattern seems a little un-needed. I don't know. I have 2 implementations of it, both of which are related to the player class. The first is getting the faction of the other player that they are visiting with. This seems like a neat way to check the faction of the other player and then react to them. But I don't see why this would be better than the check faction method that could go in the Player class. The other visitor pattern is related to the previous in the only way that it concerns the faction of the two involved in the visiting conversation. If they are enemies they will equip their weapons (which will be a change in color when all is said and done). Hopefully these are distance enough for the assignment.
Couldn't figure out which driver was the correct one, but regardless all drivers look a little sparse. Do you need help with Processing? Feel free to email or drop by office hours.
ReplyDeleteAs to pattern completion:
1 strategy (MoveBehavior), need 1 more
2 observer patterns (but can't really find where notifications are happening)
1 decorator
0 doublylinkedlist + iteration, need 1 more
2 state patterns
2 visitor patterns
GTF Paul