Exemplo n.º 1
0
        private List <string> GetAliasIdentityNames()
        {
            var identityNames = new List <string>();
            var query         = @"<AML>" +
                                "<Item action='get' type='Identity' select='keyed_name'>" +
                                "<and>" +
                                "<is_alias condition='eq'>1</is_alias>" +
                                "<classification condition='is null' />" +
                                "</and>" +
                                "</Item>" +
                                "</AML>";

            var itmsAML = Inn.applyAML(query);

            if (itmsAML != null)
            {
                var count = itmsAML.getItemCount();

                for (var i = 0; i < count; i++)
                {
                    var itm  = itmsAML.getItemByIndex(i);
                    var name = itm.getProperty("keyed_name");
                    identityNames.Add(name);
                }
                identityNames.Sort();
            }
            return(identityNames);
        }
Exemplo n.º 2
0
        private List <string> GetListRoleNames()
        {
            var roleNames = new List <string>();
            var query     = @"<AML>" +
                            "<Item action='get' type='List' select='name'>" +
                            "<keyed_name condition='eq'>Project Role</keyed_name>" +
                            "<Relationships>" +
                            "<Item action='get' type='Value' select='value' orderBy='value'>" +
                            "</Item>" +
                            "</Relationships>" +
                            "</Item>" +
                            "</AML>";

            var itmsAML = Inn.applyAML(query);

            if (itmsAML != null)
            {
                var count = itmsAML.getItemCount();
                if (1 == count)
                {
                    var rels = itmsAML.getRelationships();

                    for (var x = 0; x < rels.getItemCount(); x++)
                    {
                        var z    = rels.getItemByIndex(x);
                        var name = z.getProperty("value");
                        roleNames.Add(name);
                    }
                    roleNames.Sort();
                }
            }
            return(roleNames);
        }
Exemplo n.º 3
0
        private KeyValuePair <string, string> GetMajorVersionAndServicPack()
        {
            string servicePack  = "N/A";
            string majorVersion = "N/A";
            string amlQuery     = @"<AML>
                <Item action='get' type='Variable' select='name,value'>
                <or>
                    <name>VersionMajor</name>
                    <name>VersionServicePack</name>
                </or>
                </Item></AML>";

            Item result = Inn.applyAML(amlQuery);

            if (!result.isError())
            {
                for (int i = 0; i < result.getItemCount(); i++)
                {
                    Item item = result.getItemByIndex(i);
                    if (item.getProperty("name") == "VersionMajor")
                    {
                        majorVersion = item.getProperty("value", string.Empty);
                    }
                    if (item.getProperty("name") == "VersionServicePack")
                    {
                        servicePack = item.getProperty("value", string.Empty);
                    }
                }
            }
            return(new KeyValuePair <string, string>(majorVersion, servicePack));
        }
Exemplo n.º 4
0
    public static Building Load(BinaryReader reader)
    {
        BuildingType type           = (BuildingType)reader.ReadInt32();
        TriDirection entDir         = (TriDirection)reader.ReadInt32();
        bool         underconstruct = reader.ReadBoolean();
        bool         working        = reader.ReadBoolean();
        float        constructTime  = reader.ReadSingle();
        Building     ret            = null;

        switch (type)
        {
        case BuildingType.INN:
            ret = Inn.Load(reader);
            break;

        case BuildingType.COMPANY:
            ret = Company.Load(reader);
            break;

        case BuildingType.WORKSITE:
            ret = Worksite.Load(reader);
            break;
        }
        ret.entranceDirection = entDir;
        ret.type           = type;
        ret.UnderConstruct = underconstruct;
        ret.Working        = working;
        ret.ConstructTime  = constructTime;
        return(ret);
    }
Exemplo n.º 5
0
 public override Task <Outt> Send(Inn inn, ServerCallContext context)
 {
     return(Task.FromResult(new Outt
     {
         Message = "Hello " + inn.Name
     }));
 }
Exemplo n.º 6
0
        public User CreateUser()
        {
            var user = new User
            {
                UserName = Account != null?Account.Trim() : Inn.Trim(),
                               FirstName   = FirstName?.Trim(),
                               MiddleName  = MiddleName?.Trim(),
                               SecondName  = SecondName?.Trim(),
                               Position    = Position?.Trim(),
                               Inn         = Inn.Trim(),
                               Birthdate   = Birthdate,
                               Address     = Address?.Trim(),
                               PhoneNumber = PhoneNumber?.Trim(),
                               Email       = Email?.Trim(),
                               IsActive    = IsActive,
                               IsDeleted   = IsDeleted,
                               UserRoles   = new List <UserRole>(),
                               //todo: Password
                               PasswordHash = Inn
            };

            if (Role != null)
            {
                user.UserRoles.Add(Role.ToUserRole());
            }

            return(user);
        }
Exemplo n.º 7
0
    void Start()
    {
        Tile t = WorldController.Instance.GetTileAt((int)this.transform.position.x, (int)this.transform.position.y);

        inn = new Inn(t, 6);
        GenerateGameObjects();
    }
Exemplo n.º 8
0
Arquivo: Engine.cs Projeto: igaray/iaj
    void Awake()
    {
        _delta = 0.1f;

        objects = new Dictionary <String, EObject>();

        durations           = new Dictionary <string, float>();
        durations["pickup"] = 0.5f;
        durations["drop"]   = 0.5f;

        agents [0] = Agent.Create(agent, new Vector3(20, 23, 1), this, "", "agent1", 1000);
        agents [1] = Agent.Create(agent, new Vector3(30, 10, 1), this, "", "agent2", 1000);
        agents [2] = Agent.Create(agent, new Vector3(10, 30, 1), this, "", "agent3", 1000);
        agents [3] = Agent.Create(agent, new Vector3(22, 2, 1), this, "", "agent4", 1000);
        agents [4] = Agent.Create(agent, new Vector3(13, 10, 1), this, "", "agent5", 1000);
        agents [5] = Agent.Create(agent, new Vector3(14, 30, 1), this, "", "agent6", 1000);

//		coins["gold1"]  = Gold.Create (gold,  new Vector3(6,  0, 15), this, "", "gold1",  2);
//		coins["gold2"]  = Gold.Create (gold,  new Vector3(22, 0, 4 ), this, "", "gold2",  2);
//		coins["gold3"]  = Gold.Create (gold,  new Vector3(27, 0, 15), this, "", "gold3",  2);
//		coins["gold4"]  = Gold.Create (gold,  new Vector3(2,  0, 4 ), this, "", "gold4",  2);
//		coins["gold5"]  = Gold.Create (gold,  new Vector3(5,  0, 22), this, "", "gold5",  2);
//		coins["gold6"]  = Gold.Create (gold,  new Vector3(26, 0, 10), this, "", "gold6",  2);
//		coins["gold7"]  = Gold.Create (gold,  new Vector3(12, 0, 18), this, "", "gold7",  2);
//		coins["gold8"]  = Gold.Create (gold,  new Vector3(12, 0, 18), this, "", "gold8",  2);
//		coins["gold9"]  = Gold.Create (gold,  new Vector3(26, 0, 6 ), this, "", "gold9",  2);
//		coins["gold10"] = Gold.Create (gold,  new Vector3(11, 0, 4 ), this, "", "gold10", 2);


        inn = GameObject.FindWithTag("inn").GetComponent <Inn>();
    }
Exemplo n.º 9
0
        public async Task Should_load_accounts_list()
        {
            var firstInn = LegalEntityInn.Parse("1754462785");
            var firstKpp = Kpp.Parse("515744582");

            var secondInn = LegalEntityInn.Parse("5616395700");
            var secondKpp = Kpp.Parse("515744444");

            var orgName = "org";


            await using var accountScope1 = await Context.Accounts.CreateAccount(firstInn, firstKpp, orgName).ConfigureAwait(false);

            await using var accountScope2 = await Context.Accounts.CreateAccount(Inn.Parse("678050110389"), orgName).ConfigureAwait(false);

            await using var accountScope3 = await Context.Accounts.CreateAccount(secondInn, secondKpp, orgName).ConfigureAwait(false);

            await Task.Delay(1.Seconds());


            var accountsAfterCreate = await Context.Accounts.LoadAllAccountsAsync();

            accountsAfterCreate.Count.Should().Be(3);
            accountsAfterCreate.Should().ContainEquivalentOf(accountScope1.Entity);
            accountsAfterCreate.Should().ContainEquivalentOf(accountScope2.Entity);
            accountsAfterCreate.Should().ContainEquivalentOf(accountScope3.Entity);
        }
Exemplo n.º 10
0
        public override void DoRun()
        {
            var mfParser = new ManifestParser(_filePath, _env);

            foreach (AMLFile amlFile in mfParser.AMLFilesToExecute)
            {
                foreach (string aml in amlFile.AMLs)
                {
                    Log.Log(aml);
                    Item result = Inn.applyAML(aml);
                    if (result.isError())
                    {
                        Log.LogError($"{result.getErrorString()}");
                        if (amlFile.StopOnError)
                        {
                            Log.LogError("Stopping Executtion");
                            return;
                        }
                    }
                    else
                    {
                        Log.LogSuccess("OK");
                    }
                }
            }
        }
Exemplo n.º 11
0
 public IActionResult Post([FromBody] Inn inn)
 {
     if (obService.SearchInObList(inn.inn))
     {
         return(Ok(inn));
     }
     return(BadRequest(inn));
 }
Exemplo n.º 12
0
        public void Should_apply_inn_filter()
        {
            var docflowFilter = new DocflowFilterBuilder()
                                .WithInnKppOfALegalEntity(InnKpp.Parse("1234567890-123456789"))
                                .WithIndividualEntrepreneurInn(Inn.Parse("123456789012"))
                                .CreateFilter();

            ShouldHaveExpectedQueryParameters(docflowFilter, ("innKpp", "123456789012"));
        }
Exemplo n.º 13
0
        protected string RetrieveProperty(string propertyName)
        {
            string amlQuery = string.Format("<AML><Item action='get' type='{0}' id='{1}' select='{2}'></Item></AML>"
                                            , this.GetArasType(), this.GetId(), propertyName);

            Item   item  = Inn.applyAML(amlQuery);
            string value = item.getProperty(propertyName);

            return(value);
        }
Exemplo n.º 14
0
        public static void Start()
        {
            Console.Title = "Fantasy RPG";
            List <Merchant> equipment = Armor.StarterArmor();
            List <Merchant> weapon    = Weapons.AddWeapon();
            List <Merchant> armor     = Armor.AddArmor();
            List <Merchant> items     = Items.AddItems();
            List <Merchant> food      = Inn.AddFood();
            Hero            hero      = CreateHero(equipment, armor);

            bool activeGame = false;

            do
            {
                Console.WriteLine("\n**************************************\n" +
                                  "* 1. Go Adventuring\n" +
                                  "* 2. Show details about your character\n" +
                                  "* 3. Rest at the Inn\n" +
                                  "* 4. Visit shop\n" +
                                  "* 5. Exit\n" +
                                  "**************************************\n");
                Console.Write(">> ");
                Console.ForegroundColor = ConsoleColor.Cyan;
                string menuChoice = Console.ReadLine();
                Console.ResetColor();

                switch (menuChoice)
                {
                case "1":     // hero enters battle phase , returns boolean which if player dies ends game
                    activeGame = HeroMethods.Battle(hero);
                    break;

                case "2":     //prints Hero stats and current equipment from ToString in Hero
                    Console.WriteLine(hero);
                    break;

                case "3":     //Allows hero to rest at in exchange for gold, this heals the player to full health
                    Inn.VisitInn(hero, food);
                    break;

                case "4":     //Enters shop, where all equipment is located, when purchased items are auto equipped.
                    Merchant.ItemShop(hero, items, armor, weapon, equipment);
                    break;

                case "5":     // quits game
                    activeGame = true;
                    break;
                }
                if (hero.lvl >= 10)
                {
                    Console.WriteLine("You are a true hero! You win!");
                    activeGame = true;
                }
            } while (!activeGame);
        }
Exemplo n.º 15
0
        public static DraftPayer IndividualEntrepreneur(Inn inn)
        {
            if (inn is null)
            {
                throw new ArgumentNullException(nameof(inn));
            }

            var innString = inn.ToString() ?? throw new ArgumentNullException(nameof(inn));

            return(new(innString, null));
        }
Exemplo n.º 16
0
        public async Task Should_create_a_new_individual_entrepreneur_account_and_read_it()
        {
            await using var accountScope = await Context.Accounts.CreateAccount(Inn.Parse("678050110389"), "org");

            var account = accountScope.Entity;
            await Task.Delay(1.Seconds());

            var loadedAccount = await Context.Accounts.GetAccount(account.Id);

            loadedAccount.Should().BeEquivalentTo(account);
        }
Exemplo n.º 17
0
 public override void DoRun()
 {
     Log.Log("Url: " + Inn.getConnection().MapClientUrl("../../") + " DB: " + Inn.getConnection().Database);
     PrintReleaseAndServicePack();
     Log.Log(String.Empty);
     PrintLatestDatabaseUpgrade();
     Log.Log(String.Empty);
     PrintLatestModifiedAdminType();
     Log.Log(String.Empty);
     PrintLastLoggedInUser();
 }
Exemplo n.º 18
0
        private void CreateInnInformationScreen(Inn inn)
        {
            SetWindow(inn.Name, 708, 388);
            SetIcon("Inn");

            CreateLabel(inn.Name, false, new Point(37, 28), new Size(343, 39), 14, false, true);
            CreatePictureBox(inn.Name, new Point(143, 100), new Size(125, 125));
            CreateLabel(inn.Description, false, new Point(37, 257), new Size(343, 63), 11);
            CreateLabel("Info", false, new Point(380, 34), new Size(284, 43), 11, true);

            CreateIconValueCombo("Gold", "Gold to stay a night:", inn.GoldCost.ToString(), 412, 100);
        }
Exemplo n.º 19
0
 public IActionResult Add([FromBody] Inn inn)
 {
     if (obService.SearchInObList(inn.inn))
     {
         return(BadRequest(inn));
     }
     else
     {
         obService.AddInnToObList(inn.inn);
         return(Ok(inn));
     }
 }
Exemplo n.º 20
0
        public static DraftSender IndividualEntrepreneur(Inn inn, CertificateContent certificate)
        {
            if (inn is null)
            {
                throw new ArgumentNullException(nameof(inn));
            }
            if (certificate is null)
            {
                throw new ArgumentNullException(nameof(certificate));
            }

            return(new(inn.ToString(), null, certificate));
        }
Exemplo n.º 21
0
    public void GeneratePerson()
    {
        Inn t = target as Inn;

        if (!t)
        {
            Debug.LogError("Invalid building command");
            return;
        }
        Person worker = t.GetCommandReceiver() as Person;

        worker.Work = t;
    }
Exemplo n.º 22
0
        public void MovePlayer_WhenLandingInInn_PlayerIsLoosingTurn()
        {
            ISquare square     = new Inn(-2);
            int     diceAmount = -1;

            player = players[0];
            player.TurnsToStayStill = 0;


            gameboard.MovePlayer(player, diceAmount, square);

            Assert.AreEqual(1, player.TurnsToStayStill);
        }
Exemplo n.º 23
0
        public static void Enter(Player player)
        {
            Interface.BasicInterfaceDelegate(player, LineHelpers.PrintLineWithContinue, "The town is vibrant and people are walking around and trading freely but you sense an air of worry.");

            while (true)
            {
                // A simple switch to check what the player wants to do. this could and probably should be just a while loop
                Interface.BasicInterfaceDelegateParams(player, LineHelpers.PrintLine, "Town:", "1. Head West", "2. Enter Inn", "3. Enter Shop.", "4. Check Notice Board", "5. Character Sheet", "6. View Inventory", "7. Save and Quit Game");

                int type = LineHelpers.ReadInputNumber(new int[] { 1, 2, 3, 4, 5, 6, 7 });

                Interface.BasicInterface(player);

                // This is like the game hub and the player can only save here.

                switch (type)
                {
                case 1:
                    Dungeon.Enter(player);
                    break;

                case 2:
                    Inn.Enter(player);
                    break;

                case 3:
                    Shop.Enter(player);
                    break;

                case 4:
                    NoticeBoard.Check(player);
                    break;

                case 5:
                    Sheets.Character(player);
                    break;

                case 6:
                    player.ViewInventory();
                    break;

                default:
                    if (Game.Save(player))
                    {
                        return;
                    }
                    break;
                }
            }
        }
Exemplo n.º 24
0
    public new static Inn Load(BinaryReader reader)
    {
        InnType subType = (InnType)reader.ReadInt32();
        Inn     ret     = null;

        switch (subType)
        {
        case InnType.TENT:
            ret = Tent.Load(reader);
            break;
        }
        ret.subType = subType;
        return(ret);
    }
Exemplo n.º 25
0
        public override void DoRun()
        {
            Log.Log($"Executing {Name}");
            Item result = Inn.applyAML(GetMetaAml());

            Log.Log($"Meta data count: {result.getItemCount()}");
            LoadPackageMap(Inn);
            Log.Log($"Package Elements total count: {_packageMap.Count}");

            int itemsCount               = 0;
            int unpackagedItemsCount     = 0;
            int itemsAddedToPackageCount = 0;

            for (int i = 0; i < result.getItemCount(); i++)
            {
                Item   item      = result.getItemByIndex(i);
                string keyedName = item.getPropertyAttribute("id", "keyed_name");
                if (keyedName.StartsWith(Prefix, StringComparison.OrdinalIgnoreCase))
                {
                    itemsCount++;
                    if (!CheckIfInPackage(item))
                    {
                        Log.Log($"Not in any package: {item.getType()} named {keyedName}");
                        unpackagedItemsCount++;
                        var pkgMgr = new Hille.Aras.DevTool.Common.Commands.Aras.PackageManagment.PackageManager(Inn)
                        {
                            DryRun   = DryRun,
                            AutoPack = AutoPack
                        };
                        ((ILoggable)pkgMgr).Logger = Log;
                        Item packageElement = pkgMgr.FindAndAddSuitablePackageForItem(item);
                        if (!packageElement.isError())
                        {
                            string packageDefName = pkgMgr.GetPackageDefinitionNameFromPackageElement(packageElement);
                            Log.LogSuccess($"Added to package {packageDefName} as {packageElement.getProperty("element_type")} ");
                            itemsAddedToPackageCount++;
                        }
                        else
                        {
                            Log.LogWarning("Could not find a suitable package");
                        }
                    }
                }
            }
            Log.Log($"Items checked: {itemsCount}");
            Log.Log($"Items not in any package: {unpackagedItemsCount}");
            Log.Log($"Items added to package: {itemsAddedToPackageCount}");
        }
Exemplo n.º 26
0
    private void checkInsideBuilding()
    {
        SimulationState ss;

        ss = (GameObject.FindGameObjectWithTag("GameController").
              GetComponent(typeof(SimulationEngineComponentScript))
              as SimulationEngineComponentScript).engine as SimulationState;
        //ss.stdout.Send("Inns: "+ss.inns.Values.ToString());
        int currentNode = (AstarPath.active.GetNearest(this.transform.position).node as GridNode).GetIndex();

        if (SimulationState.getInstance().nodeToInn.ContainsKey(currentNode))
        {
            Inn inn = SimulationState.getInstance().nodeToInn[currentNode];
            inn.heal(this);
        }
    }
        public List <DatabaseUpgrade> GetDatabaseUpgrades()
        {
            var databaseUpgrades = new List <DatabaseUpgrade>();

            string aml = @"<AML>
                <Item action='get' type='DatabaseUpgrade' 
                    select='applied_on,name,target_release,is_latest,description' orderBy='applied_on DESC'>
                </Item></AML>";
            string latestUpdatedDate = String.Empty;
            Item   dbUpgradeItems    = Inn.applyAML(aml);
            int    i = 0;
            bool   allUpdatesFromLatestDay = false;

            while (!allUpdatesFromLatestDay && (i < dbUpgradeItems.getItemCount()))
            {
                Item   dbUpgrade   = dbUpgradeItems.getItemByIndex(i);
                string appliedDate = dbUpgrade.getProperty("applied_on", String.Empty);
                if (appliedDate != String.Empty)
                {
                    appliedDate = appliedDate.Substring(0, 10);
                }
                if (latestUpdatedDate == String.Empty && appliedDate != String.Empty)
                {
                    latestUpdatedDate = appliedDate.Substring(0, 10);
                }

                if (appliedDate == latestUpdatedDate)
                {
                    var databaseUpgrade = new DatabaseUpgrade
                    {
                        AppliedOn     = dbUpgrade.getProperty("applied_on"),
                        Name          = dbUpgrade.getProperty("name"),
                        TargetRelease = dbUpgrade.getProperty("target_release"),
                        Description   = dbUpgrade.getProperty("description"),
                        IsLatest      = (dbUpgrade.getProperty("is_latest") == "1") ? true : false
                    };
                    databaseUpgrades.Add(databaseUpgrade);
                }
                i++;
            }
            return(databaseUpgrades);
        }
Exemplo n.º 28
0
        public void UpdateUser(User user)
        {
            user.UserName = user.UserName != null?user.UserName.Trim() : Inn.Trim();

            user.FirstName   = FirstName?.Trim();
            user.MiddleName  = MiddleName?.Trim();
            user.SecondName  = SecondName?.Trim();
            user.Position    = Position?.Trim();
            user.Inn         = Inn.Trim();
            user.Birthdate   = Birthdate;
            user.Address     = Address?.Trim();
            user.PhoneNumber = PhoneNumber?.Trim();
            user.Email       = Email?.Trim();
            user.IsActive    = IsActive;
            user.IsDeleted   = IsDeleted;

            var userRole = user.UserRoles.FirstOrDefault(r => r.RoleId == Role.Id && r.IsDeleted == false);

            if (userRole != null)
            {
                return;
            }

            var activeUserRoles = user.UserRoles.Where(r => r.UserId == user.Id && r.IsDeleted == false);

            foreach (var activeUserRole in activeUserRoles)
            {
                activeUserRole.MarkAsDeleted();
            }

            if (Role != null)
            {
                var newUserRole = Role.ToUserRole();

                if (user.UserRoles == null)
                {
                    user.UserRoles = new List <UserRole>();
                }

                user.UserRoles.Add(newUserRole);
            }
        }
Exemplo n.º 29
0
        private string GetPackageName()
        {
            string amlQuery = $@"<AML>
                  <Item action='get' type='PackageGroup' select='source_id'> 
                    <Relationships>
                      <Item action='get' type='PackageElement' select='element_type,name'>
                        <element_type>{this.GetArasType()}</element_type>
                        <name>{this.GetKeyedName()}</name>
                      </Item>  
                    </Relationships>
                  </Item>
                </AML>";
            Item   result   = Inn.applyAML(amlQuery);

            if (result.isError())
            {
                return("N/A");
            }
            return(result.getPropertyAttribute("source_id", "keyed_name"));
        }
Exemplo n.º 30
0
        /// <summary>
        /// Creates a new InnScreen object.
        /// </summary>
        public InnScreen(Inn inn)
            : base()
        {
            // check the parameter
            if (inn == null)
            {
                throw new ArgumentNullException("inn");
            }

            this.IsPopup = true;
            this.inn     = inn;

            welcomeMessage = Fonts.BreakTextIntoList(inn.WelcomeMessage,
                                                     Fonts.DescriptionFont, maxWidth);
            serviceRenderedMessage = Fonts.BreakTextIntoList(inn.PaidMessage,
                                                             Fonts.DescriptionFont, maxWidth);
            noGoldMessage = Fonts.BreakTextIntoList(inn.NotEnoughGoldMessage,
                                                    Fonts.DescriptionFont, maxWidth);

            selectionMark = 1;
            ChangeDialogue(welcomeMessage);
        }
Exemplo n.º 31
0
        /// <summary>
        /// Creates a new InnScreen object.
        /// </summary>
        public InnScreen(Inn inn)
            : base()
        {
            // check the parameter
            if (inn == null)
            {
                throw new ArgumentNullException("inn");
            }

            this.IsPopup = true;
            this.inn = inn;

            welcomeMessage = Fonts.BreakTextIntoList(inn.WelcomeMessage,
                Fonts.DescriptionFont, maxWidth);
            serviceRenderedMessage = Fonts.BreakTextIntoList(inn.PaidMessage,
                Fonts.DescriptionFont, maxWidth);
            noGoldMessage = Fonts.BreakTextIntoList(inn.NotEnoughGoldMessage,
                Fonts.DescriptionFont, maxWidth);

            selectionMark = 1;
            ChangeDialogue(welcomeMessage);
        }
Exemplo n.º 32
0
    void Awake()
    {
        _delta = 0.1f;

        objects = new Dictionary <String, EObject>();

        durations = new Dictionary<string, float>();
        durations["pickup"] = 0.5f;
        durations["drop"]   = 0.5f;

        agents [0] = Agent.Create(agent, new Vector3(20, 23, 1), this, "", "agent1", 1000);
        agents [1] = Agent.Create(agent, new Vector3(30, 10, 1), this, "", "agent2", 1000);
        agents [2] = Agent.Create(agent, new Vector3(10, 30, 1), this, "", "agent3", 1000);
        agents [3] = Agent.Create(agent, new Vector3(22, 2, 1),  this, "", "agent4", 1000);
        agents [4] = Agent.Create(agent, new Vector3(13, 10, 1), this, "", "agent5", 1000);
        agents [5] = Agent.Create(agent, new Vector3(14, 30, 1), this, "", "agent6", 1000);

        //		coins["gold1"]  = Gold.Create (gold,  new Vector3(6,  0, 15), this, "", "gold1",  2);
        //		coins["gold2"]  = Gold.Create (gold,  new Vector3(22, 0, 4 ), this, "", "gold2",  2);
        //		coins["gold3"]  = Gold.Create (gold,  new Vector3(27, 0, 15), this, "", "gold3",  2);
        //		coins["gold4"]  = Gold.Create (gold,  new Vector3(2,  0, 4 ), this, "", "gold4",  2);
        //		coins["gold5"]  = Gold.Create (gold,  new Vector3(5,  0, 22), this, "", "gold5",  2);
        //		coins["gold6"]  = Gold.Create (gold,  new Vector3(26, 0, 10), this, "", "gold6",  2);
        //		coins["gold7"]  = Gold.Create (gold,  new Vector3(12, 0, 18), this, "", "gold7",  2);
        //		coins["gold8"]  = Gold.Create (gold,  new Vector3(12, 0, 18), this, "", "gold8",  2);
        //		coins["gold9"]  = Gold.Create (gold,  new Vector3(26, 0, 6 ), this, "", "gold9",  2);
        //		coins["gold10"] = Gold.Create (gold,  new Vector3(11, 0, 4 ), this, "", "gold10", 2);

        inn = GameObject.FindWithTag ("inn").GetComponent<Inn>();
    }
 public void addInn(Inn inn)
 {
     inn._name   = "inn" + inns.Count;
     inns[inn._name]  = inn;
     nodeToInn[inn.getNode().GetIndex()] = inn;
 }