Example #1
0
        public void TileClicked(Coordinate coordinate, OwnerTypeEnum ownerType)
        {
            ITile tile = null;

            switch (ownerType)
            {
            case OwnerTypeEnum.Player:
                tile = PlayerTileMatrix.GetTile(coordinate);
                break;

            case OwnerTypeEnum.Enemy:
                tile = EnemyTileMatrix.GetTile(coordinate);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(ownerType), ownerType, null);
            }
            tile.Click();
        }