Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
alexciornei22 committed Nov 21, 2022
1 parent e791d70 commit a966887
Show file tree
Hide file tree
Showing 19 changed files with 115 additions and 2 deletions.
2 changes: 1 addition & 1 deletion checkstyle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Starting audit...
[ERROR] /home/student/poo-tema1/./src/main/command/GetCardAtPosition.java:13:48: Parameter y should be final. [FinalParameters]
[ERROR] /home/student/poo-tema1/./src/main/command/GetCardAtPosition.java:19:5: Class 'GetCardAtPosition' looks like designed for extension (can be subclassed), but the method 'execute' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'GetCardAtPosition' final or making the method 'execute' static/final/abstract/empty, or adding allowed annotation for the method. [DesignForExtension]
[ERROR] /home/student/poo-tema1/./src/main/command/GetCardAtPosition.java:20:25: Parameter output should be final. [FinalParameters]
[ERROR] /home/student/poo-tema1/./src/main/command/GetCardAtPosition.java:25: Line is longer than 100 characters (found 114). [LineLength]
[ERROR] /home/student/poo-tema1/./src/main/command/GetCardAtPosition.java:25: Line is longer than 100 characters (found 113). [LineLength]
[ERROR] /home/student/poo-tema1/./src/main/command/UseEnvironmentCard.java:10:10: Variable 'game' must be private and have accessor methods. [VisibilityModifier]
[ERROR] /home/student/poo-tema1/./src/main/command/UseEnvironmentCard.java:11:9: Variable 'handIdx' must be private and have accessor methods. [VisibilityModifier]
[ERROR] /home/student/poo-tema1/./src/main/command/UseEnvironmentCard.java:12:9: Variable 'affectedRow' must be private and have accessor methods. [VisibilityModifier]
Expand Down
5 changes: 5 additions & 0 deletions input/test07_attack_card_invalid.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@
"command": "placeCard",
"handIdx": 0
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 3
},
{
"command": "useEnvironmentCard",
"handIdx": 0,
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions ref/ref_test04_use_environment_card.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 2,
Expand All @@ -31,6 +33,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 1,
Expand All @@ -50,6 +54,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 1,
Expand All @@ -64,6 +70,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 2,
Expand Down
8 changes: 8 additions & 0 deletions ref/ref_test05_use_environment_card_invalid.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
},
{
"command": "getCardAtPosition",
"x": 1,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 2,
Expand All @@ -30,6 +32,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 1,
Expand Down Expand Up @@ -58,6 +62,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 1,
Expand All @@ -73,6 +79,8 @@
},
{
"command": "getCardAtPosition",
"x": 1,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 2,
Expand Down
10 changes: 10 additions & 0 deletions ref/ref_test07_attack_card_invalid.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"command": "getCardAtPosition",
"x": 0,
"y": 3,
"output": "No card available at that position."
},
{
"command": "cardUsesAttack",
"cardAttacker": {
Expand All @@ -13,6 +19,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 0,
Expand Down Expand Up @@ -54,6 +62,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 0,
Expand Down
4 changes: 4 additions & 0 deletions ref/ref_test08_use_card_ability.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 0,
Expand Down Expand Up @@ -89,6 +91,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 0,
Expand Down
4 changes: 4 additions & 0 deletions ref/ref_test09_use_card_ability_invalid.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 6,
Expand All @@ -16,6 +18,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 6,
Expand Down
8 changes: 8 additions & 0 deletions ref/ref_test10_attack_hero.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 6,
Expand All @@ -53,6 +55,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 6,
Expand Down Expand Up @@ -135,6 +139,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 1,
"output": {
"mana": 1,
"attackDamage": 0,
Expand All @@ -150,6 +156,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 6,
Expand Down
4 changes: 4 additions & 0 deletions ref/ref_test11_attack_hero_invalid.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 5,
Expand Down Expand Up @@ -77,6 +79,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 6,
Expand Down
4 changes: 4 additions & 0 deletions ref/ref_test12_use_hero_ability_1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 0,
Expand All @@ -15,6 +17,8 @@
},
{
"command": "getCardAtPosition",
"x": 1,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 6,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 6,
Expand All @@ -16,6 +18,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 0,
Expand All @@ -25,6 +27,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 2,
Expand All @@ -47,6 +51,8 @@
},
{
"command": "getCardAtPosition",
"x": 3,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 2,
Expand All @@ -61,6 +67,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 0,
Expand Down
8 changes: 8 additions & 0 deletions ref/ref_test15_use_hero_ability_2_invalid.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"command": "getCardAtPosition",
"x": 1,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 6,
Expand All @@ -15,6 +17,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 2,
Expand Down Expand Up @@ -43,6 +47,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 2,
Expand All @@ -58,6 +64,8 @@
},
{
"command": "getCardAtPosition",
"x": 1,
"y": 0,
"output": {
"mana": 3,
"attackDamage": 7,
Expand Down
12 changes: 12 additions & 0 deletions ref/ref_test16_multiple_games_valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 5,
Expand Down Expand Up @@ -91,6 +93,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 5,
Expand Down Expand Up @@ -252,6 +256,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 7,
Expand Down Expand Up @@ -287,6 +293,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 5,
Expand Down Expand Up @@ -314,6 +322,8 @@
},
{
"command": "getCardAtPosition",
"x": 0,
"y": 0,
"output": {
"mana": 2,
"attackDamage": 0,
Expand All @@ -332,6 +342,8 @@
},
{
"command": "getCardAtPosition",
"x": 2,
"y": 0,
"output": {
"mana": 1,
"attackDamage": 5,
Expand Down
Loading

0 comments on commit a966887

Please sign in to comment.