WerWolfInteraktion/Logger.cs
2026-06-16 13:46:12 +02:00

29 lines
591 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Wolf
{
public class Logger
{
private string _history = "";
public void Log(string message)
{
_history += message + "\n";
Console.WriteLine(message);
}
public string GetHistory()
{
return _history;
}
public string getLastLine()
{
string[] lines = _history.Split('\n', StringSplitOptions.RemoveEmptyEntries);
return lines.Length > 0 ? lines[^1] : "";
}
}
}