Download presentation
Presentation is loading. Please wait.
Published byClaribel Short Modified over 9 years ago
1
User Interface Design TRASE Project Software Engineering Fall 2008
2
Configuration File (1) [GameBoard] ; Number and names of continents on the game board ; The number of names listed shall match the number of continents ; If the number of continent names does not match the number of continents, ; the program will display an error, print the default config file, and exit. NumberOfContinents = 2 NamesOfContinents = Endor Numenor ; Number and names of territories on the game board ; The number of names listed shall match the number of territories ; If the number of territory names does not match the number of territories, ; the program will display an error, print the default config file, and exit. NumberOfTerritories = 7 NamesOfTerritories = Andustar Harlindon Forostar Mittalmar Minhiriath Orrostar Forodwraith
3
Configuration File (2) ; Matrix to represent territory adjacencies ; This is a square matrix with the size equal to the number of territories ; At each intersection, a 1 represents a connection between the intersecting ; territories, and a 0 represents the lack of a connection between the ; intersecting territories ; Example: ; 0 1 1 ; 1 0 0 ; This adjacency matrix shows that territory 0 is connected to territory ; 1 and territory 2. Territory 2 only connects to territory 1, and territory ; 3 only connects to territory 1. ; In general, if matrix[i][j] == 1, then territory i is connected to territory j. ; NOTE: The matrix should be symmetrical about the upper-left to lower-right diagonal ; The diagonal should contain all 0s. TerritoryAdjacencyMatrix = 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0
4
Configuration File (3) ; Matrix to represent territories contained within each continent ; This is not a square matrix. The number of rows is equal to the number of ; continents. The number of columns is equal to the number of territories. ; Thus, rows are continents and columns are territories. ; At each intersection, a 1 means that the territory is a member of that continent. ; A 0 means that the territory is not a member of that continent. ; Example: (2 continents, 3 territories) ; 0 1 1 ; 1 0 0 ; This means that continent 0 contains territories 1 and 2. Continent 1 contains ; territory 0. ; NOTE: A territory may only be the member of one continent. Thus, each column ; of this matrix will contain a single 1; the rest of the rows for that column will ; contain a 0. ContinentMatrix = 0 1 0 0 1 0 1 1 0 1 1 0 1 0 ; Reinforcement bonuses awarded for possession of each continent ; The continents are listed in order (from continent 0 to continent x) ; The number for each continent represent the bonus reinforcements ; awarded to the player at the beginning of their turn for the ownership ; of all the territories which comprise the continent. ContinentReinforcement = 2 4
5
Configuration File (4) [AI] ; Specifies the number of players to be defined. NumberOfPlayers = 4 ; AI behavior is controlled by the strategies assigned to the AI ; An AI is created by specifying (in order) the types of each strategy ; Alliances may also be specified if desired. ; ; Strategies (listed in order): Alliance, Card, Defense, Fortification, Offense ; Strategy types: A = Aggressive, C = Conservative, R = Random ; Numbers following Strategies denote allies (by player number) ; - Player number is determined by order listed, starting with 1 ; - Self-alliances will be ignored. ; Example: A C R A C 2 ; - This player has an aggressive Alliance Strategy, conservative Card Strategy, ; random Defense Strategy, aggressive Fortification Strategy, and conservative ; Offense Strategy. This player is allied with player 2. ; NOTE: The number of players specified here (i.e. the number of rows here) ; shall match the NumberOfPlayers specified above. Players = A A A A A 2 A C C C A 1 R R R R R 4 C C R R R 3
6
Configuration File (5) [Statistics] ; (1 = Print, 0 = Do Not Print) ; >>Turn by Turn<< (Printed at end of each player's turn) ; List of continents owned by the player ContinentsOwned = 1 ; Number of territories owned by player in each continent NumberOfTerritoriesPerContinent = 1 ; Total number of territories owned by player NumberOfPlayerTerritories = 1 ; Number of Risk cards currently held by player NumberOfRiskCards = 1 ; Strength of player, based on current reinforcement potential w/o cards PlayerStrength = 1
7
Configuration File (6) ; >>End of Game<< (Printed at the end of the game) ; First continent occupied for an entire round FirstContinentOccupied = 1 ; First player to occupy continent for an entire round FirstContinentOccupier = 1 ; Number of times a territory was occupied (i.e. changed hands) during the game NumberOfTerritoryOccupations = 1 ; For each continent, largest number of units in a territory in that continent LargestTerritoryGarrison = 1
8
Command Line Usage Message Usage: java TRASE [arguments] Arguments: -hPrint this help message and create a sample config file -dRun in debug mode (detailed report of every decision made) -f FILENAMESpecify the configuration file Examples java TRASE -f configfile.dat -d java TRASE -h
9
Console Output Game Configuration Configuration file: configfile.txt Game Initialization Round 1 Round 2 Player 2 eliminated. Round 3... Round 7 Player 3 wins. Game End Debug Report: report_debug.txt Turn Report: report_turn.txt Game Report: report_turn.txt Note: This console output will only appear in debug mode. In normal mode the only console output will be error messages.
10
Turn Report TRASE turn report Created on 23/10/2008 at 22:30:14 Turn #,Player #,Total # Territories Owned,# Cards,Strength,# of Territories Owned in Asia,# of Territories Owned in Australia,# of Territories Owned in Europe,# of Territories Owned in Africa,# of Territories Owned in South America,# of Territories Owned in North America,Continents Owned 0,0,13,0,4,4,1,3,2,1,2, 0,1,12,0,4,4,1,3,2,1,2, 0,2,12,0,4,4,1,3,2,1,2, 1,0,13,1,4,4,1,3,2,1,2, 1,1,15,1,4,4,1,3,2,1,2,Australia 1,2,11,0,3,4,1,3,2,1,2, 2,0,13,2,4,4,1,3,2,1,2,Australia 2,1,16,2,5,4,1,3,2,1,2, 2,2,10,0,3,4,1,3,2,1,2,South America
11
End of Game Report TRASE End of Game Report created on 23/10/2008 at 23:16:26 Game winner: 2 First continent occupied: Australia Player to occupy the first continent: 0 Turn of first continent occupied: 1 Largest number of troops ever in one territory: 65 Territory with largest number of troops: Siam Turn of largest number of troops on one territory: 9 Number of times each territory changed hands: Asia -Siam3 -Ural1 -Japan1 -China3 -etc.3 Africa -Madagascar2 -North Africa6 -Ethopia3 -etc.7
12
Debug Report (1) -Game Configuration ----------------------------------------------------------- Configuration file: E:\configfile.txt Number of players: 4 Player 1: Aggressive Card Strategy Aggressive Offensive Strategy Aggressive Defensive Strategy Aggressive Fortification Strategy Aggressive Alliance Strategy Alliances: 2 4 Player 4: Aggressive Card Strategy Conservative Offensive Strategy Aggressive Defensive Strategy Random Fortification Strategy Random Alliance Strategy Alliances: 1
13
Debug Report (2) -Game Initialization ---------------------------------------------------------- Initial Territory Distribution 1: 01 04 10 15 20 25 2: 02 03 06 17 19 26 Initial Troop Distribution C01: 5 C02: 1 C03: 4 C04: 1
14
Debug Report (3) -Round 1 ---------------------------------------------------------------------- - Player 1 Turn Cards: A C C I No cards turned in. Total reinforcements: 12 Reinforcement placement C04: 1 C10: 5 C25: 6 Invade C04 with 5 troops (owned by P02) P01 -1 P02 -1 P01 wins Move 3 troops from C01 to C04 - Player 2 Turn....
15
Debug Report (4) -Round 15 --------------------------------------------------------------------- Player 4 eliminated. Game over. -Game End --------------------------------------------------------------------- Winner: Player 2 Debug Report: E:\report_debug.txt Turn Report: E:\report_turn.txt Game Report: E:\report_turn.txt
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.