You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When initialize the gameboard, each player should have half knights and half archers.
183
-
Since the total number is odd, the difference between the number of knights and archers should be 1.
188
+
Since the total number is odd, each player should have one more knight than archers.
189
+
The arrangement of knights and archers of each player are should be in a staggered pattern.
184
190
185
191
**Note** that player cannot win the game by move an archer out of the central place.
186
192
193
+
### Bonus Task 2 - Additional Tests
194
+
195
+
In this bonus task, you are required to design additional JUnit5 tests besides the sample tests provided by us.
196
+
The objective of this bonus task is to increase the [branch coverage](https://en.wikipedia.org/wiki/Code_coverage) of
197
+
all classes under folder `src/main/java` by executing your tests along with the sample tests, compared
198
+
with only using sample tests.
199
+
The more branches (that are not covered by sample tests) are covered by your tests, the more bonus points you will get.
200
+
You can get 1 point for each 10% improvement of branch coverage.
201
+
202
+
Your additional tests should be put in the `AdditionalTests` class in folder `src/test/java/castle/comp3021/assignment`.
203
+
187
204
## Obfuscated Version
188
205
189
206
We provide an obfuscated demo program which implements Jeson Mor.
@@ -215,6 +232,12 @@ We provide code skeleton with detailed JavaDoc for you to complete this assignem
215
232
There are in total 9 (10 if you plan to implement Archer) `TODO`s for you to implement.
216
233
Do not modify other parts of the Java code, otherwise many tests will fail unexpectedly.
217
234
235
+
### Dependencies
236
+
237
+
Code of this assignment depends on several libraries, including `JUnit5` and Jetbrains `Annotations`.
238
+
Jar package of these dependencies are provided in folder `lib`, you need to add `lib` folder as the library of your
239
+
IntelliJ Project. Typically, this is already done, if you download use the prepared code in this repository.
240
+
218
241
### Coordinate System
219
242
220
243
In order to facilitate implementation, we both use integers in the coordinates of x and y-axis (starting from 0) to
@@ -262,6 +285,8 @@ Sample tests are given in `src/test/java` folder.
262
285
263
286
* Try your best to consider as many corner cases as possible, your tests will test if your implementation is robust
264
287
enough to handle various kinds of scenarios.
288
+
* If you have doubts of any behaviours that are not specified, you can check the provided obfuscated version, or ask
289
+
the TAs.
265
290
266
291
### Frequently Asked Questions
267
292
@@ -289,6 +314,8 @@ Note that good code style is also a part of your grade in this assignment.
289
314
Your submission is a zip file including:
290
315
* The Java project. Please maintain the original file structure.
291
316
* A `github_url.txt` file containing the url of your private repository.
317
+
We will ask you to add TAs' accounts as collaborators.
318
+
You need to submit your zip file in [CASS](https://cssystem.cse.ust.hk/UGuides/cass/index.html) (not CANVAS).
292
319
293
320
## Plagiarism
294
321
@@ -308,7 +335,8 @@ We will conduct code plagiarism tests on your program, and your grade will be de
308
335
| Keep your Github repository private | 5% | You must keep your repository private all the time. |
309
336
| At least 3 commits in different days | 5% | You must commit in **three****different** days in your repository. |
310
337
| Pass all sample tests | 10% | (# of passed tests / # of sample tests) * 30% |
311
-
| Pass all TA-only unit tests | 40% | (# of passed tests / # of unit tests) * 40% |
312
-
| Pass all TA-only integrated tests | 30% | (# of passed tests / # of integrated tests) * 10% |
338
+
| Pass all TA-only unit tests | 40% | (`# of passed tests` / `# of unit tests`) * 40% |
339
+
| Pass all TA-only integrated tests | 30% | (`# of passed tests` / `# of integrated tests`) * 10% |
313
340
| Code Style | 10% | Get 10% if no error in code style checking. Deduct 1% for each 5 errors. |
314
-
| Pass tests for Bonus tasks | Up to 10% | (# of passed tests / # of all tests) * 10% |
341
+
| Bonus Task 1: Pass tests for Bonus tasks 1 | Up to 10% | (`# of passed tests` / `# of all tests`) * 10% |
342
+
| Bonus Task 2: new tests increasing branch coverage | Up to 5% | (`Branch Coverage of Your tests, including sample tests` - `Branch Coverage of Sample tests`) * 10% |
</span><spanclass="modifiers">public</span> <spanclass="returnType">@NotNull <ahref="protocol/Move.html" title="class in castle.comp3021.assignment.protocol">Move</a>[]</span> <spanclass="memberName">getAvailableMoves</span>​(<spanclass="arguments"><ahref="protocol/Player.html" title="class in castle.comp3021.assignment.protocol">Player</a> player)</span></div>
354
354
<divclass="block">Get all available moves of one player.
355
355
This method is called when it is the <ahref="protocol/Player.html" title="class in castle.comp3021.assignment.protocol"><code>Player</code></a>'s turn to make a move.
356
-
It will iterative all <ahref="protocol/Piece.html" title="class in castle.comp3021.assignment.protocol"><code>Piece</code></a>s belonging to the <ahref="protocol/Player.html" title="class in castle.comp3021.assignment.protocol"><code>Player</code></a> on board and obtain available moves of
356
+
It will iterate all <ahref="protocol/Piece.html" title="class in castle.comp3021.assignment.protocol"><code>Piece</code></a>s belonging to the <ahref="protocol/Player.html" title="class in castle.comp3021.assignment.protocol"><code>Player</code></a> on board and obtain available moves of
357
357
each of the <ahref="protocol/Piece.html" title="class in castle.comp3021.assignment.protocol"><code>Piece</code></a>s through method <ahref="protocol/Piece.html#getAvailableMoves(castle.comp3021.assignment.protocol.Game,castle.comp3021.assignment.protocol.Place)"><code>Piece.getAvailableMoves(Game, Place)</code></a> of each <ahref="protocol/Piece.html" title="class in castle.comp3021.assignment.protocol"><code>Piece</code></a>.
358
358
<p>
359
359
<strong>Attention: Student should make sure all <ahref="protocol/Move.html" title="class in castle.comp3021.assignment.protocol"><code>Move</code></a>s returned are valid.</strong></div>
0 commit comments