Assignment 2 – From interfaces to components
1 The player
2 The administrator

Assignment 2 – From interfaces to components

Due Wednesday 10/10 11:59pm

1 The player

The "Overlord Founder of our Precious Startup" has decided that it costs too much to outsource the development of players for the new game product of the company. Instead they have decided to assign to your team to develop the player based on an interface some other team has designed. You will find the interface in your team’s GitHub repository in the file "interface.pdf" in "Deliverables/2/".

If the interface is not complete, i.e., it does not specify all the necessary functionality to implement the player, feel free to fill in what is missing. If the interface makes assumptions about features your language does not have, feel free to replace them with those of your language you see fit. Finally, if the interface requests capabilities unnecessary to implement a player component, such as a GUI, feel free to ignore them. In any case, record all of the above and justify your choices in a memo addressed to the "Overlord Founder of our Precious Startup".

Your player implementation should read commands/operation requests from STDIN and write the results of those commands to STDOUT. The commands should be encoded as JSON objects of the following shape:

{"operation-name" : name,"operation-argument1": arg1,...,"operation-argumentN": argN}

where name is a string corresponding to the name of an operation the player provides and arg1,...,argN are JSON values corresponding to their arguments. Your player must handle any input of that form but is not responsible to handle other input.

Deliverables: In your team’s GitHub repository, create a directory "Deliverables/2/2.1/" and deposit there your executable, input and output files for five tests, and a memo pdf (if you made changes to the interface).

2 The administrator

The "Overlord Founder of our Precious Startup" has not really decided what the interface between the player and the administrator should be. So you also have to develop an administrator that assumes a player that follows the player interface you designed for assignment 1.

If you realize that your interface is not complete, i.e., it does not specify all the necessary functionality to implement the administrator expects from a player, feel free to fill in what is missing. As for the previous part of the assignment, record any modifications to your interface and justify your choices in a memo addressed to the "Overlord Founder of our Precious Startup".

Your administrator implementation should issue commands/operation requests to STDOUT and read the results of these commands from STDIN. The commands should be encoded as JSON objects of the shape described for the player.

Deliverables: In your team’s GitHub repository, create a directory "Deliverables/2/2.2/" and deposit there your executable, input and output files for five tests, and a memo pdf (if you made changes to the interface).