package tournament; public abstract class Result { private String reason; private static White w = new White(); private static Black b = new Black(); public static Result white() { return w; } public static Result black() { return b; } public static Result white(String r) { return new White().setReason(r); } public static Result black(String r) { return new Black().setReason(r); } public boolean isWhite() { return false; } public boolean isBlack() { return false; } public Result setReason(String r) { reason = r; return this; } public String getReason() { return reason; } public abstract String print(); }