Week 12 Set a
Due Date Mon at 9:00pm (Week 12)
Purpose Finish minicraft!
Graded Exercises
It’s almost Thanksgiving, and the holiday season is right around the corner. You just have a few last features to implement for your game before shipping it! The description of the protocol is still found at Week 9 Set a, and as one of your classmates pointed out, there was a typo in the spec that said the server would send 'leave when a player left, but it actually sends 'left – the spec has been updated to accurately describe what the server does. At the end of this assignment, you should have a complete, working game that can connect to the server and interact with your classmates. The below exercises break that into stages.
Exercise 1 Implement your to-draw handler if you haven’t already.
Exercise 2 If there are any remaining pieces of functionality that you did not implement in prior assignments (i.e., movement), make sure they all work. Incorporate feedback received in grading. As stated above, we will expect you to have a functioning game that we can play!
Exercise 3 Add support for 'join & 'left messages in your on-receive handler. Note that you will only receive these messages from the server, not send them. In addition to check-expect tests, you should also manually test via the server by connecting two copies of your client with (launch-many-worlds (main 1) (main 1)) (or however you start your client) and having one enter or leave the tile where the other is located.
Exercise 4 Add support for 'place and 'smash messages, both receiving them from the server in your on-receive handler and sending them to the server. Again, you should test this both locally with check-expect and also by interacting with the server. To check what state the server has, leave the tile and come back (or connect a new client and move to the tile), to make sure the state you have locally is not different from what the server has. If it is, that’s a sign you either aren’t sending the right messages or aren’t handling the messages the server is sending you. Note this, of course, assumes that you are handling 'map messages properly, as otherwise you will never be able to see what the state of the server is, which is the source of truth in this application.
Exercise 5 Add support for 'burygold messages, both sending & receiving.