Simple java library to solve Dragons of Mugloar game.
- Add new module to your project
- Create client
- Load a game
- Load weather information
- Generate game solution
- Submit solution to a server
- Check results
###1. Add new module to your project
Include the following in your pom.xml
for Maven:
<dependencies>
<dependency>
<groupId>com.github.javadev</groupId>
<artifactId>Dragons-of-Mugloar-solution</artifactId>
<version>1.0</version>
</dependency>
...
</dependencies>
###2. Create client
AsyncClient client = AsyncClient.createDefault();
###3. Load a game
GameResponse game = client.getGame().get();
###4. Load weather information
WeatherResponse weatherResponse = client.getWeather(game.getGameId()).get();
###5. Generate game solution
SolutionRequest request = client.generateGameSolution(game.getGameResponseItem(), weatherResponse);
###6. Submit solution to a server
SolutionResponse response = client.sendSolution(game.getGameId(), request).get();
###7. Check results
if ("Victory".equals(response.getStatus())) {
// We win a game
} else if ("SRO".equals(weatherResponse.getCode())) {
// Storm weather
}