public Hexagon RevealHexagonAt(HexagonPosition hexagonPosition) { if (Hexagons.ContainsKey(hexagonPosition)) { throw new InvalidOperationException($"The hexagon was already revealed. Use Indexer or {nameof(GetHexagonAtPosition)} instead."); } var hexagon = HexagonRevealer.GenerateHexagonAt(hexagonPosition); Hexagons.Add(hexagonPosition, hexagon); HexagonRevealed?.Invoke(this, hexagon); return(hexagon); }
public HexagonManager(GameplaySettings gameplaySettings) { GameplaySettings = gameplaySettings; HexagonRevealer = new HexagonRevealer(this, gameplaySettings); }