34 lines
841 B
C#
34 lines
841 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Game
|
|
{
|
|
public class Config
|
|
{
|
|
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
|
|
|
public Config()
|
|
{
|
|
}
|
|
|
|
public string this[string key]
|
|
{
|
|
get => dictionary[key];
|
|
set => dictionary[key] = value;
|
|
}
|
|
|
|
// This is for debugging only, remove this later
|
|
public string[] Commands;
|
|
|
|
public string[] GetLines()
|
|
{
|
|
string[] lines = new string[dictionary.Count + Commands.Length];
|
|
int lineIndex = 0;
|
|
foreach (var kvp in dictionary)
|
|
lines[lineIndex++] = $"{kvp.Key} {kvp.Value}";
|
|
foreach (var cmd in Commands)
|
|
lines[lineIndex++] = cmd;
|
|
|
|
return lines;
|
|
}
|
|
}
|
|
} |