Skip to content

Implement Camicia Practice Exercise#3105

Open
thibault2705 wants to merge 19 commits intoexercism:mainfrom
thibault2705:camicia-exercice
Open

Implement Camicia Practice Exercise#3105
thibault2705 wants to merge 19 commits intoexercism:mainfrom
thibault2705:camicia-exercice

Conversation

@thibault2705
Copy link
Copy Markdown

@thibault2705 thibault2705 commented Apr 16, 2026

pull request

Implement Camicia practice exercise specified in camicia/instructions.md.

This PR solves the task #3010.


Reviewer Resources:

Track Policies

@thibault2705 thibault2705 marked this pull request as draft April 16, 2026 20:39
@thibault2705 thibault2705 marked this pull request as ready for review April 16, 2026 20:40
Copy link
Copy Markdown
Member

@jagdish-15 jagdish-15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a trailing newline will resolve the Checkstyle error.

*/
private record RoundResult(Player nextStarter, int pileSize) {
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

assertEquals(474, camicia.getCards());
assertEquals(66, camicia.getTricks());
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

int getTricks() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}


private Camicia simulateGame(List<String> playerA, List<String> playerB) {
Camicia camicia = new Camicia();
camicia.simulateGame(playerA, playerB);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I find it strange having to make an instance just to call the test method. Instead, could simulateGame be static (so the test doesn't need to make a new Camaicia())?. The status, cards and tricks could be returned in a separate record so that the tests can check them.

assertEquals(1, camicia.getTricks());
}

@Test
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each test except the first should have the @Disabled("Remove to run test") annotation. See Bob for example.

@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an older version of Gradle (we have been using Gradle 9.3.1 on the other exercises). Perhaps copy the Gradle files from one of the other exercises.

{
"authors": [],
"contributors": [
"thibault2705"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be the "author" instead of "contributor" (generally, the one who adds the exercise is the author and contributor is someone who updates after it has been added)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants