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
Example code for using the CodinGame-Puzzles-Stats library
importcom.github.mathieusoysal.codingame_stats.puzzle.Puzzle;
importcom.github.mathieusoysal.codingame_stats.puzzle.achievement.Achievement;
importcom.github.mathieusoysal.codingame_stats.puzzle.topic.Topic;
importcom.github.mathieusoysal.codingame_stats.CodinGame;
publicclassCodeExemple {
publicstaticvoidmain(String[] args) {
CodinGamecodinGame = newCodinGame();
// Get all puzzles of CodinGameList<Puzzle> puzzles = codinGame.getPuzzles();
// Iterate over all puzzlesfor (Puzzlepuzzle : puzzles) {
// Print the title of the puzzleSystem.out.println(puzzle.getTitle());
// Print the solved count of the puzzleSystem.out.println(puzzle.getSolvedcount());
// Print the attempt count of the puzzleSystem.out.println(puzzle.getAttemptCount());
// Print the achievement count of the puzzleSystem.out.println(puzzle.getAchievementCount());
// Print the xp points of the puzzleSystem.out.println(puzzle.getXpPoints());
// Print the created date of the puzzleSystem.out.println(puzzle.getCreatedDate());
// Print the title of the puzzleSystem.out.println(puzzle.getTitle());
// Print the contributor of the puzzleSystem.out.println(puzzle.getContributor());
// Print the topics of the puzzlefor (Topictopic : puzzle.getTopics()) {
System.out.println(topic.getHandle());
System.out.println(topic.getValue());
}
// Print the achievements of the puzzlefor (Achievementachievement : puzzle.getLinkedAchievements()) {
System.out.println(achievement.getTitle());
System.out.println(achievement.getDescription());
System.out.println(achievement.getPoints());
System.out.println(achievement.getLevel());
}
}
}
}