public class Game {
  // Rest of the game class remains the same. Omitting...
  public static boolean play(Player p, Pile pile) {
    int sticksTaken = p.takeTurn(pile);
    System.out.println("\n" + p.getName() + " takes " + sticksTaken + " sticks.\n" +
    "There are " + pile.getSticks() + " left in the pile.");

if (p instanceof GreedyPlayer) { ((GreedyPlayer) p).jeer(); // Print the GreedyPlayer's message }
if (pile.getSticks() <= 0) { return true; } return false; } }