return new EconomyResponse(0, 0, ResponseType.FAILURE, "Cannot withdraw negative funds");
}
Holdings holdings = accounts.get(playerName).getHoldings();
if (holdings.hasEnough(amount)) {
holdings.subtract(amount);
return new EconomyResponse(amount, holdings.getBalance(), ResponseType.SUCCESS, null);
} else {
return new EconomyResponse(0, holdings.getBalance(), ResponseType.FAILURE, "Insufficient funds");
}
}