CS 5500 Assignment #4. Assigned: Thursday, 6 February 2014 Due: Thursday, 13 February 2014 Working in an instructor-approved team of four students (except for a few smaller teams approved by the instructor), develop a rapid prototype of the greatly simplified version of the semester project specified below. Your prototype's source code must be written entirely by your team. Your team may not use source code written by other students, source code obtained from the World-Wide Web or other sources, and it may not use software packages that are not already installed on the CCIS Linux machines. In exceptional circumstances, you may ask the instructor for permission to use third party source code. You should not assume that permission will be granted. Your prototype must include a README file (which *must* be in UTF-8 plain text, and must be named README) that 1. lists all members of your team, 2. gives the preferred email address(es) for contacting your team, 3. tells the grader(s) how your team's rapid prototype can be compiled and run on any CCIS Linux machine in the main lab, 4. acknowledges any third party software used (by permission!) in your submitted software. All of the files necessary to construct and to run your prototype must be combined into a gzip'ed tar file whose name ends in tar.gz. Submit that gzip'ed tar file before 10pm on the date it is due using the submit script that's described at the course assignments page: http://www.ccs.neu.edu/course/cs5500sp14/assignments.html Your prototype will be graded on these criteria: 1. the quality of the instructions and documentation in your README file, 2. the ease of constructing and running your prototype on CCIS Linux machines, 3. your prototype's correctness with respect to parsing correct command lines sending correct messages not sending extraneous messages not sending messages too early not attempting to create files 4. and the readability of your source code. Your prototype's build process must result in software that can be invoked by cd'ing to the directory containing your software's executable and executing a command of the following form: ./play5500 The play5500 program should then read the referee's first message from standard input. That message will have the syntax specified below for . After receiving that message, then the play5500 program should send an initial configuration for its pieces to standard output. That message should have the syntax specified below for . After sending that initial configuration to standard output, the play5500 program's behavior depends on whether it moves first or second. If the referee's first message says the play5500 program moves first, then the play5500 program should send its first move to standard output, and should then terminate with an exit code of zero. If the referee's first message says the play5500 program moves second, then the play5500 program should terminate with an exit code of zero without sending any more messages. A rapid prototype of the referee program has been placed within /course/cs5500sp14/Assignments/A5 ---------------------------------------------------------------- Format of messages. The first message sent by the referee to a game-playing program will have the following context-free syntax: ::= (go time/move ) ::= 1 | 2 ::= | . ::= | ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 If is 1, the recipient of the message will move first. If is 2, the recipient of the message will move second. The numerical value of specifies the amount of time, in seconds, that will be allowed for each move. The message that conveys the initial configuration must have the following context-free syntax: ::= ( ) ::= | ::= ( ) ::= A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | B9 | B10 | B11 | B12 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | D11 | D12 | E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9 | E10 | E11 | E12 ::= F | L | B | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 As discussed in class, the positions are relative to the player, with columns A through E, with column A the leftmost, and rows 1 through 12, with the player's headquarters positions in row 1. As discussed in class, piece F is the flag, piece L is a landmine, piece B is a bomb, piece 1 is an engineer, and so on through piece 9, which is a field marshall. Positions B1, D1, B12, and D12 are headquarters positions. Positions B3, D3, C4, B5, D5, B8, D8, C9, B10, and D10 are camps. Within the initial configuration, camps must be empty. No position may be occupied by more than one piece. The initial configuration must place the correct number of each piece (one flag, three landmines, two bombs, three engineers, and so on). All of a player's pieces must be placed on the player's side of the board (rows 1 through 6). The flag must be placed in a headquarters position. Landmines can be placed only within rows 1 and 2. Bombs cannot be placed in row 6. The message that conveys the first move must have the following context-free syntax: ::= ( ) The first of the two positions must be occupied by one of the player's pieces. The second of the two positions must be reachable from the first via road or railroad according to the rules of Luzhanqi. ----------------------------------------------------------------