MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage:...

9
MMTS Interface Requirements Specification

Transcript of MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage:...

Page 1: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

MMTS

Interface Requirements Specification

Page 2: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Interface for command line usage

java .\Monopoly

Usage: Monopoly <option> <option>…

options:

-g<number> number of games to play with same set of rules. If not set only 1 game will be played

-p<number> number of players between 2 and 6.

-r<number> max number of rounds to play “-1” will allow for game to end when only 1 player is left.

-b<number> game ends when number of players go bankrupt

-j player cannot receive rent while in jail when option is active

Page 3: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Interface for command line usage

java .\Monopoly –g3 –r –p3 –b3 -j

Ends when 3 players declares bankruptcy

Jail rules activated

Game 1 started

Game 1 completed

Game 2 started

Game 2 completed

Game 3 started

Game 3 completed

Collecting statistics and producing report

Page 4: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Layout of Game Board File

Page 5: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Layout of input file shall be a text file defined as follows:• File shall open and close with <gameboard> and </gameboard> tag respectively each subsequent parameter being inside of

this tag. • Each game space shall be defined with a <space> and end with </space> with each subsequent parameter defining this

space being inside of this tag.• The order in which each space appears in this file will sequentially determine the layout of the board.• The name of a space shall be enclosed in <name> and </name>• The type of a space shall be enclosed in <type> and </ type>• A space shall only be one of the following types:

Go IncomeTaxJail GoToJailLuxuryTax UtilityRailroad PropertyFreeParking

• If a space is a property it will have a color group, and the color group shall be a single integer to designate grouping. The color group shall be enclosed in <color> and </color> tags

• The price of a space shall be enclosed in <price> and </price> (will only be used on necessary spaces)• The house price of a space shall be enclosed in <house> and </house> (will only be used on necessary spaces)• The rent of a space shall be enclosed in <rent#> and </rent#> (will only used on necessary spaces, the # sign will be

replaced with numbers 0-5 designating rent for each added house up to a hotel)

Page 6: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Example gameboard file<gameboard>

<space><name>Go</name><type>Go</type>

</space><space>

<name>Mediterranean Avenue</name><type>Property</type><color>1</color><price>60</price><house>50</house><rent0>2</rent0><rent1>10</rent1><rent2>30</rent2><rent3>90</rent3><rent4>160</rent4><rent5>250</rent5>

</space><space>

<name>Reading Railroad</name><type>Railroad</type><price>200</price>

</space><space>

<name>Chance</name><type>Chance</type>

</space></gameboard>

Page 7: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Report Formatting

Page 8: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

Report Format

The following slide shall be the report format for each game played. All games played shall be put into one single report output.All report output will be directed to stdout.

Page 9: MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.

######################################Game <game#> report<designated flags set during at command line>######################################Per Player Statistics-------------------------- Rounds Max Net Gross Total Highest Highest # of Property Times Total Houses Hotels DoublesPlayer# in game Money Income Expenses Net Worth Gross Income Gross Expense Groups Owned In Jail Cards Drawn Purchased Purchased Rolled---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Player<Player#, and their respected attributes>

Game statistics-------------------------------------Average money in player hand: <Average Amount Total Net Income>Number of times properties were mortgaged: <Amount Mortgaged>Number of times properties were unmortgaged : <Amount Unmortgaged>

Game space(board order) Total # times landed on-----------------------------------------------------------------------<board space> <# of time landed on>

Game space Total # times landed on(descending order)------------------------------------------------------------------------------<board space> <times landed on>

Property that collected the most rent: <Property Name>------------------------------------------------------

Property Group that collected the most rent: <Property Group>-------------------------------------------------------------

Listing of properties owned by player-------------------------------------Player: <Player#>-------------------------------------<Properties owned>