Hols der Geier was realized in Java as part of the module Fundamentals of Programming.
Upon opening in your favorite IDE, you just need to extend your Bot Class with the Player Class and override the abstract method. Your bot will be integrated automatically, just select it in the options window.
public abstract PlayerCard getNextCardFromPlayer(final int pointCardValue);
@Override
public PlayerCard getNextCardFromPlayer(final int oldPointValue) {
try {
System.out.print("Your Cards left to play: ");
this.getCards().forEach(k -> System.out.print(k.getValue() + " "));
System.out.print("\nYour card: ");
return new PlayerCard(Integer.parseInt(new BufferedReader(new InputStreamReader(System.in)).readLine()));
}catch (IOException e) {
System.out.println(e.getMessage());
}
return null;
}
For rules click here!
- Better Exception handling (coding my own handler)
- Database setup to save stats
- Use a Logger instead of System.out
Thank you for contributing!
rabitem