feat: l geminada working

This commit is contained in:
Gerard Gascón 2024-04-14 23:15:50 +02:00
parent 1869a92580
commit 30ca50fb35
15 changed files with 189 additions and 29 deletions

View file

@ -5,12 +5,17 @@ using Domain.Input;
namespace Domain {
public class CustomInput {
private readonly Dictionary<Type, InputReader> _readers = new();
private readonly KeyHistory _history;
public CustomInput() {
_history = new KeyHistory();
_readers.Add(typeof(CedillaReader), new CedillaReader());
_readers.Add(typeof(GeminadaReader), new GeminadaReader(_history));
}
public void UpdateInput() {
_history.CheckPresses();
foreach (KeyValuePair<Type, InputReader> reader in _readers) {
reader.Value.UpdateInput();
}