|
1 |
| -# Manual |
2 |
| - |
3 |
| -This is the user manual of BattleShip Game. |
4 |
| -You may find detail program usage and error message explanation here. |
5 |
| - |
| 1 | +# Manual |
| 2 | + |
| 3 | +This is the user manual for BattleShip Game. |
| 4 | +You may find detail program usage and error message explanations here. |
| 5 | + |
6 | 6 | # GUI
|
7 |
| - |
| 7 | + |
8 | 8 | ## Starting GUI
|
9 |
| - |
| 9 | + |
10 | 10 | To start GUI, follow the command in `README.md`. It may take a while for the application window to show.
|
11 |
| - |
| 11 | + |
12 | 12 | ## Basic Steps
|
13 |
| - |
| 13 | + |
14 | 14 | ### Set up a Server
|
15 |
| - |
16 |
| -In order to start a game, first a server needed to be set up. |
17 |
| - |
| 15 | + |
| 16 | +In order to start a game, first a server is needed to be set up. |
| 17 | + |
18 | 18 | 
|
19 |
| - |
20 |
| -Choose server mode and enter all necessary information. Then the server side will notice await client connection. |
21 |
| - |
22 |
| -Then, open up another program with Client mode. Here is an example of information will be asked when starting program as client |
23 |
| - |
| 19 | + |
| 20 | +Choose server mode and enter all necessary information. Then the server side will await client connection. |
| 21 | + |
| 22 | +Then, open up another program with Client mode. Here is an example of that will be asked when starting the program as a client. |
| 23 | + |
24 | 24 | 
|
25 |
| - |
26 |
| -#### Player name limitation |
27 |
| - |
28 |
| -Player name can now only use character in a-zA-Z0-9 with length 1-20. Program will repeatedly ask for info if standard not met. |
29 |
| - |
30 |
| -Right now, the server and the client may have the same player name. **It is recommended that different name used during game play** |
31 |
| - |
| 25 | + |
| 26 | +#### Player name limitation |
| 27 | + |
| 28 | +Player names can now only use characters in a-zA-Z0-9 with length 1-20. Program will repeatedly ask for info if the standard is not met. |
| 29 | + |
| 30 | +Right now, the server and the client may have the same player name. **It is recommended that different name is used during game play** |
| 31 | + |
32 | 32 | #### Network Issue
|
33 |
| - |
34 |
| -However, if you enter wrong network information (address/port). The program will fail and exit |
35 |
| - |
| 33 | + |
| 34 | +However, if you enter the wrong network information (address/port), the program will fail and exit |
| 35 | + |
36 | 36 | ### Main Frame
|
37 |
| - |
38 |
| -When client and server finished syncing, the main frame will be shown as following. |
39 |
| - |
| 37 | + |
| 38 | +When client and server is finished syncing, the main frame will be shown as follows: |
| 39 | + |
40 | 40 | 
|
41 |
| - |
42 |
| -The left board will be self player board, where ship will be set using it. The right board will represent enemy's board and self player will hit target using that board. |
43 |
| - |
| 41 | + |
| 42 | +The left board will be the player board, where players will set up their ships. The right board will represent the enemy's board where the player will try to hit enemy targets. |
| 43 | + |
44 | 44 | #### Set Ship
|
45 |
| - |
46 |
| -In order to get started, both player needs to set up the ships on their board first. To set ship, click on any cell where you would like the ship to have. The cell you clicked will be the head of the ship. |
47 |
| - |
48 |
| -There will be two follow-up dialogs allows you to: |
49 |
| - |
| 45 | + |
| 46 | +In order to get started, both players need to set up the ships on their board first. To set a ship, click on any cell where you would like the ship to be located. The cell you clicked will be the head of the ship. |
| 47 | + |
| 48 | +There will be two follow-up dialogs allowing you to: |
| 49 | + |
50 | 50 | - choose which ship to add
|
51 | 51 | - choose ship direction
|
52 |
| - |
| 52 | + |
53 | 53 | 
|
54 |
| - |
55 |
| -After setting a ship, board will show the corresponded cell using 'X' sign. In order to remove a ship from the location, click the cell with 'X' sign, and it will remove the ship at that location. The cell does not necessary to be the head of the ship. |
56 |
| - |
| 54 | + |
| 55 | +After setting a ship, the player board will show the corresponding cell using the 'X' sign. In order to remove a ship from the location, click the cell with 'X' sign, and it will remove the ship at that location. The cell does not necessarily need to be the head of the ship. |
| 56 | + |
57 | 57 | 
|
58 |
| - |
59 |
| -When all ships are set, any further clicks will bring to the following: |
60 |
| - |
| 58 | + |
| 59 | +When all ships are set, any further clicks will bring up the following message: |
| 60 | + |
61 | 61 | 
|
62 |
| - |
| 62 | + |
63 | 63 | #### Start the turn
|
64 |
| - |
65 |
| -Once you are ready, click on the ready button on the left. Once both side are ready, the following notice will appear: |
66 |
| - |
| 64 | + |
| 65 | +Once you are ready, click on the ready button on the left panel. Once both players are ready, the following notice will appear: |
| 66 | + |
67 | 67 | 
|
68 |
| - |
| 68 | + |
69 | 69 | Now the game has officially started. The turn and time will be shown on the status board below
|
70 |
| - |
| 70 | + |
71 | 71 | 
|
72 |
| - |
73 |
| -When it is your turn, click on the enemy board that haven't been discovered, and if there is a ship, an 'X' will show on the cell. |
74 |
| - |
| 72 | + |
| 73 | +When it is your turn, click on the enemy board at a coordinate that has not been discovered, and if there is a ship, an 'X' will show on the cell. |
| 74 | + |
75 | 75 | 
|
76 |
| - |
| 76 | + |
77 | 77 | And on the enemy point of view, they will see the block discovered like the following:
|
78 |
| - |
| 78 | + |
79 | 79 | 
|
80 |
| - |
| 80 | + |
81 | 81 | The win condition will be:
|
82 |
| - |
83 |
| -- The first player revealed all enemy's ship |
84 |
| -- The enemy didn't make a move during given time frame |
85 |
| - |
86 |
| -Once one of the conditions is met, a result page will show and both players can decide whether to move to next game or not. The first player click the next game will be prompted the following: |
87 |
| - |
| 82 | + |
| 83 | +- When the first player reveals all enemy's ships |
| 84 | +- If the enemy didn't make a move during given time frame |
| 85 | + |
| 86 | +Once one of the conditions is met, a result page will show and both players can decide whether to move to the next game or not. The first player to click the next game will be prompted with the following: |
| 87 | + |
88 | 88 | 
|
89 |
| - |
90 |
| -Once the enemy decided next game, click on OK to move start the new game. |
91 |
| - |
92 |
| -### Configuration |
93 |
| - |
| 89 | + |
| 90 | +Once the enemy has decided to play the next game, click on OK to start the new game. |
| 91 | + |
| 92 | +### Configuration |
| 93 | + |
94 | 94 | 
|
95 |
| - |
96 |
| -You may change the UI of the application by editing configuration. To open configuration panel, you may use the `Settings` button on the toolbar, or the `Configuration` button under `Actions` menu. |
97 |
| - |
| 95 | + |
| 96 | +You may change the UI of the application by editing configuration. To open the configuration panel, you may use the `Settings` button on the toolbar, or the `Configuration` button under `Actions` menu. |
| 97 | + |
98 | 98 | Please do not edit settings during game turn.
|
99 |
| - |
100 |
| -Notice: |
101 |
| - |
102 |
| -- **`Grid Size` and `Time Limit` will be sync from the server if program started with client mode.** |
103 |
| -- All changes will take effective after program restart |
104 |
| - |
| 99 | + |
| 100 | +Notice: |
| 101 | + |
| 102 | +- **`Grid Size` and `Time Limit` will be synced from the server if the program is started with client mode.** |
| 103 | +- All changes will take effect after the program restarts |
| 104 | +- There is no ship configuration for now. |
| 105 | + |
105 | 106 | #### Colors
|
106 |
| - |
107 |
| -You may change the color of based on cell status, and the text/mark color over it. Simply click the color blocks on the right column, and a color chooser will appear. |
108 |
| - |
109 |
| -Once you have decided a color, click ok, and you may find the map appear changed at the same time. |
110 |
| - |
111 |
| -Notice: **All color configuration won't be sync with the client** |
112 |
| - |
113 |
| -#### Time limit per round |
114 |
| - |
115 |
| -Time (in second) each move needs to be done. Min second allowed is 5. |
116 |
| - |
| 107 | + |
| 108 | +You may change the color of the discovered cells, and the mark color over it. Simply click the color blocks on the right column, and a color chooser panel will appear. |
| 109 | + |
| 110 | +Once you have decided a color, click ok. Your settings will then be saved. |
| 111 | + |
| 112 | +Notice: **All color configuration won't be synced with the client** |
| 113 | + |
| 114 | +#### Time limit per round |
| 115 | + |
| 116 | +Time (in seconds) each move needs to be done. The minimum number of seconds allowed is 5. |
| 117 | + |
117 | 118 | #### Grid Size
|
118 |
| - |
119 |
| -The size of the grid. When clicked, a dialog will prompt current settings, and you may change at this point. Row and col must be larger than 0, and the total number of cell must be at least 17 so that all ships can fit in the grid. |
120 |
| - |
| 119 | + |
| 120 | +The size of the grid. When clicked, a dialog will prompt current settings, and you may change at this point. Row and col must be larger than 0, and the total number of cells must be at least 17 so that all ships can fit in the grid. |
| 121 | + |
121 | 122 | ---
|
122 |
| - |
123 |
| -Once you have finished set up, you may close the configuration by clicking X on the top right. **Your changes will be saved immediately after you have changed the value. For text field, please press ENTER to confirm your decision.** |
124 |
| - |
| 123 | + |
| 124 | +Once you have finished set up, you may close the configuration by clicking X on the top right. **Your changes will be saved immediately after you have changed the value. For a text field, please press ENTER to confirm your decision.** |
| 125 | + |
125 | 126 | ### Typing and number
|
126 |
| - |
127 |
| -For input box accept a number. **Please press enter to confirm** and if the input given cannot be parsed as a valid number, a warning will be given. Please double check your input and try again. |
128 |
| - |
| 127 | + |
| 128 | +For the input box to accept a number. **Please press enter to confirm** and if the input given cannot be parsed as a valid number, a warning will be given. Please double check your input and try again. |
| 129 | + |
129 | 130 | ## Error Messages
|
130 |
| - |
| 131 | + |
131 | 132 | Here are some examples of the error messages
|
132 |
| - |
133 |
| -- Ship overlapped |
134 |
| - - When set the ship, there are another ships already block the way. Please double check your input |
| 133 | + |
| 134 | +- Ship overlapped |
| 135 | + - When setting the ship, there may be another ship already blocking the way. Please double check your input |
135 | 136 | - Please wait for your turn
|
136 |
| - - When you click the enemy board when it is not your turn, this warning will be given |
137 |
| -- Invalid Coordinate |
138 |
| - - Some part of the ship will be out of the map range, please double check your input |
139 |
| - |
140 |
| - |
| 137 | + - When you click the enemy board when it is not your turn, this warning will be given |
| 138 | +- Invalid Coordinate [x y] |
| 139 | + - Some part of the ship will be out of the map range, please double check your input |
| 140 | + |
| 141 | + |
141 | 142 | ### Limitations
|
142 |
| - |
| 143 | + |
143 | 144 | Currently, there are some limitation/inconsistency you may find during game play
|
144 |
| - |
| 145 | + |
145 | 146 | #### Unstable network
|
146 |
| - |
147 |
| -This game currently does not tolerate any network issue including latency larger than 2 seconds. You may find game behave abnormally if using under bad network condition |
148 |
| - |
| 147 | + |
| 148 | +This game currently does not tolerate any network issue including latency longer than 2 seconds. You may find game behaves abnormally if using it under bad network condition |
| 149 | + |
149 | 150 | #### Client/Server Exit
|
150 |
| - |
151 |
| -If either Client/Server exited during game play, the other side won't be notified, and their game will freeze. |
152 |
| - |
| 151 | + |
| 152 | +If either Client/Server exited during game play, the other side won't be notified, and their game will freeze. |
| 153 | + |
153 | 154 | #### Starting game
|
154 |
| - |
155 |
| -The starting notice mentioned above **may postponed for around 3 seconds after both side are ready due to be some final data synchronization and time frame adjustment.** |
156 |
| - |
| 155 | + |
| 156 | +The starting notice mentioned above **may be postponed for around 3 seconds after both sides are ready due to some final data synchronization and time frame adjustment.** |
| 157 | + |
157 | 158 | #### Notification
|
158 |
| - |
159 |
| -Please dismiss any Dialog as quick as possible, as it may block the game process. Failed to do so may lead the game out of sync. |
160 |
| - |
| 159 | + |
| 160 | +Please dismiss any Dialog as quick as possible, as it may block the game process. Failing to do so may lead the game out of sync. |
| 161 | + |
161 | 162 | #### Time count
|
162 |
| - |
163 |
| -Currently, time limits are counted by the players themselves. There may be around 1-2 seconds display delay, but the real time count should still be correct. |
164 |
| - |
| 163 | + |
| 164 | +Currently, time limits are counted by the players themselves. There may be around 1-2 seconds of display delay, but the real time count should still be correct. |
| 165 | + |
165 | 166 | ### Long initialization time
|
166 |
| - |
167 |
| -When the program is generating maps (new map), it might be slow to response. Please be patient. |
168 |
| - |
169 |
| -The suggested size of the map is no larger than (30x30) |
| 167 | + |
| 168 | +When the program is generating maps (new map), it might be slow to respond. Please be patient. |
| 169 | + |
| 170 | +The suggested size of the map is no larger than (30x30) |
0 commit comments