package org.project.util;

/**
 * Small helper that wraps text in ANSI escape codes so the combat log is
 * colourful in the terminal. Keeping all the codes in one place means the rest
 * of the game never has to remember the raw "[..m" strings.
 *
 * Colour convention used across the game:
 *   red   -> damage taken / dealt
 *   blue  -> mana / stamina usage
 *   green -> healing and good news
 */
public final class ConsoleColors {

    private ConsoleColors() {
        // utility class, never instantiated
    }

    public static final String RESET = "[0m";
    public static final String RED = "[31m";
    public static final String GREEN = "[32m";
    public static final String YELLOW = "[33m";
    public static final String BLUE = "[34m";
    public static final String PURPLE = "[35m";
    public static final String CYAN = "[36m";
    public static final String BOLD = "[1m";

    public static String red(String text) {
        return RED + text + RESET;
    }

    public static String green(String text) {
        return GREEN + text + RESET;
    }

    public static String blue(String text) {
        return BLUE + text + RESET;
    }

    public static String yellow(String text) {
        return YELLOW + text + RESET;
    }

    public static String purple(String text) {
        return PURPLE + text + RESET;
    }

    public static String cyan(String text) {
        return CYAN + text + RESET;
    }

    public static String bold(String text) {
        return BOLD + text + RESET;
    }
}
