6515 S '13
Acquire, Revised
Acquire Plan
Project 1
Project 2
Project 3
Project 4
Project 5
Project 6
Project 7
Project 8
Project 9
Project 10
Project 11
Project 12

Project 4

Due date: 2/04, 23:59

Objective 1: to design and implement an Acquire board data representation and interface

Objective 2: to create a test harness for the Acquire board representation

Objective 3: to design an interface for an Acquire state representation

Task 1: Your final task is to design and implement an Acquire board data representation. The design choices are up to you. For a minimal external API, see task 2. Satisfying task 2 may or may not suffice for all other clients of this library.

Task 2: Your second task is to implement and deliver a test harness, dubbed board-tester that responds to requests in the form of XML elements with responses. It should come with a subfolder, board-tests, with up to 10 test cases specified as a pair of file: inN.xml and outN.xml for N = 0, ..., 9. Each test case that exposes a flaw in some other code base gets you a bonus point.

There are five kinds of requests. To the first kind of request, a board service replies with a response; to the last four requests, it replies with a Board, a common form of data. If a query makes no sense or results in an erroneous operation on the board, the service may also reply with an Error.

   inspect    = <query row=Row column=Column> Board </query>
   singleton  = <singleton row=Row column=Column> Board </singleton>
   growing    = <growing row=Row column=Column> Board </growing>
   founding   = <founding row=Row column=Column label=Label> Board </founding>
   merging    = <merging row=Row column=Column label=Label> Board </merging>
   singleton  = <singleton /> 
   founding   = <founding />
   growing    = <growing name=Label /> 
   merging    =
     <merging acquirer=Label acquired1=Label />
     <merging acquirer=Label acquired1=Label acquired2=Label />
     <merging acquirer=Label acquired1=Label acquired2=Label acquired3=Label />
   impossible = <impossible msg=String />
   error      = <error msg=String />
   Board      = <board> Tile ... Hotel ... </board>
   Hotel      = <hotel name=Label>Tile ...</hotel> 
   Tile       = <tile column=Column row=Row />

   Label      = "American" | ... | "Worldwide"
   Row        = "A" | ... | "I"
   Column     = "1" | ... | "12"

common forms of data

A <query row=Row column=Column>Board</query> request determines what kind of effect the placement of tile (Column,Row) would have.

A singleton, growing, founding, and merging request call for the placement of tile (Column,Row) and the indicated effect. The founding request includes the hotel that is to be founded; the merging request specifies which hotel acquires all others involved in the merger.

Task 3: Your final task is to design a data representation for the complete game information of an Acquire game. Imagine a game administrator that initializes the state representation and uses it to keep track of the state of a game as it is played.

Equip this data representation with an external interface that supports the complete execution of a game. Think of the game as a "state machine" and of game turns as "state transitions." In addition to a game administrator, also consider how an "artificial intelligence" may use this representation of games.

last updated on Wed Apr 10 20:51:12 EDT 2013generated with Racket