-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
848bdff
commit 68d645f
Showing
2 changed files
with
11 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,11 @@ | ||
|
||
|
||
# Tema POO - GwentStone | ||
|
||
<div align="center"><img src="https://tenor.com/view/witcher3-gif-9340436.gif" width="500px"></div> | ||
|
||
#### Assignment Link: [https://ocw.cs.pub.ro/courses/poo-ca-cd/teme/tema](https://ocw.cs.pub.ro/courses/poo-ca-cd/teme/tema) | ||
|
||
|
||
## Skel Structure | ||
|
||
* src/ | ||
* checker/ - checker files | ||
* fileio/ - contains classes used to read data from the json files | ||
* main/ | ||
* Main - the Main class runs the checker on your implementation. Add the entry point to your implementation in it. Run Main to test your implementation from the IDE or from command line. | ||
* Test - run the main method from Test class with the name of the input file from the command line and the result will be written | ||
to the out.txt file. Thus, you can compare this result with ref. | ||
* input/ - contains the tests in JSON format | ||
* ref/ - contains all reference output for the tests in JSON format | ||
|
||
## Tests | ||
|
||
1. test01_game_start - 3p | ||
2. test02_place_card - 4p | ||
3. test03_place_card_invalid - 4p | ||
4. test04_use_env_card - 4p | ||
5. test05_use_env_card_invalid - 4p | ||
6. test06_attack_card - 4p | ||
7. test07_attack_card_invalid - 4p | ||
8. test08_use_card_ability - 4p | ||
9. test09_use_card_ability_invalid -4p | ||
10. test10_attack_hero - 4p | ||
11. test11_attack_hero_invalid - 4p | ||
12. test12_use_hero_ability_1 - 4p | ||
13. test13_use_hero_ability_2 - 4p | ||
14. test14_use_hero_ability_invalid_1 - 4p | ||
15. test15_use_hero_ability_invalid_2 - 4p | ||
16. test16_multiple_games_valid - 5p | ||
17. test17_multiple_games_invalid - 6p | ||
18. test18_big_game - 10p | ||
|
||
|
||
<div align="center"><img src="https://tenor.com/view/homework-time-gif-24854817.gif" width="500px"></div> | ||
First, 2 objects of type Player are instantiated (one for each of the players) with their corresponding sets of decks. | ||
|
||
For each of the game inputs a new Game instance is created and the hero is set for each of the players, then | ||
for every action a Command object is retrieved and is executed (each action object implements the Command interface). | ||
|
||
Each command receives an output object, on which it inserts its errors/outputs to be printed on the JSON file. | ||
|
||
Each card type corresponds to a class which inherits from the base Card class. | ||
|
||
The cards that have special abilities have a specialability field which contains an ability object that inherits from | ||
an ability interface, which could be a normal special ability or a row special ability, depending on each case. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters