Skip to content

Commit

Permalink
add README
Browse files Browse the repository at this point in the history
  • Loading branch information
alexciornei22 committed Nov 24, 2022
1 parent 848bdff commit 68d645f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 45 deletions.
55 changes: 11 additions & 44 deletions README.md
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.
1 change: 0 additions & 1 deletion src/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public static void action(final String filePath1,

ArrayNode output = objectMapper.createArrayNode();

//TODO add here the entry point to your implementation
Player player1 = new Player(inputData.getPlayerOneDecks());
Player player2 = new Player(inputData.getPlayerTwoDecks());

Expand Down

0 comments on commit 68d645f

Please sign in to comment.