Lab #10: Onward and Upward with Project 3 Get the various points in this lab checked off by a TA by the last lab of Tuesday, 27 November. 1. Fill in the processCommandArgs function. It should just break out the command-line arguments into variables that can be accessed elsewhere in the program. It should also check for validity---not all combinations are legal (for example 'java amazons -b Foo:torus.cs' is NOT legal, but 'java amazons -b Foo' IS). 2. Fill in the amazons.main method to act on the command arguments appropriately. There are basically the following cases that determine what kinds of Player you create and what mailboxes you create. 2a. First, where do the mailboxes come from? java amazons Foo Create new mailboxes, rebind them in a SimpleObjectRegistry. java amazons Foo:Host Fetch mailboxes from remote host with SimpleObjectRegistry.findObject. Otherwise Create new mailboxes. 2b. Second: who is the "player" java amazons ... -m ... MachinePlayer is the "player" Otherwise HumanPlayer is the "player" 2c. Third: who is the opponent java amazons ... Foo or java amazons ... Foo:HOST "Opponent" is on other machine; no thread created for it. Otherwise "Opponent" is a MachinePlayer Your main method must also choose who gets blue and who gets red, and must read the initial move file, if any. 3. How are you going to test your program? Generate test cases and modify Makefile as needed. The -S argument is useful for making repeatable test cases. The -i argument is useful for setting up a situation to test certain things (like end-of-game detection). 4. Now would also be a good time to get the INTERNALS and User-Manual out of the way. 5. It's a good idea to have a simple MachinePlayer done (AND CHECKED INTO PRCS) before you try anything adventurous. The simplest would be to find ANY possible move. Another would be to generate ALL possible moves and assign them random values, picking the one with highest value. 6. Have items 1-4 checked off, leaving just 5 to finish the project. ------------------------------------------------------------ Useful Notes. 1. To test remote play against yours or another program, you can simply start it twice with java amazons ... Foo in one shell window and java amazons ... Foo:localhost in another on the same machine. 2. Two get two shell windows in one Emacs, use the sequence M-x shell ; Go to shell window M-x rename-buffer ; Rename from *shell* to *2shell* Rename buffer (to new name): *2shell* M-x shell ; Create a new shell Now you have two Emacs buffers with shells in them, one names *shell* and the other *2shell*.