示例#1
0
        //Creer un lot de cargaison pour un aeroport
        private CClients CreerCargaison(int min, int max, CAeroport SelfAero)
        {
            Random rand     = new Random(DateTime.Now.Millisecond);
            double quantite = rand.Next((min * 10), (max * 10));

            UsineClient usineClient = new UsineClient();

            return(usineClient.creeClient(PrendreAeroportRand(SelfAero), quantite));
        }
示例#2
0
        //Creer un point de detresse
        private void CreerPointDetresse()
        {
            Random rand = new Random(DateTime.Now.Millisecond);

            //creer un position aléatoire sur la carte
            int      x           = rand.Next(0, Resource.carte_du_monde.Width);
            int      y           = rand.Next(0, Resource.carte_du_monde.Height);
            Position mapPosition = new Position(x, y);

            UsineClient usineClient = new UsineClient();

            TrouverAeroportProche(mapPosition, trouverAvionPourClient(typeClient.Detresse)).AjouterClient(usineClient.creeClient(mapPosition));
        }
示例#3
0
        //Creer un incendit ou un point d'intérêt
        private void CreerSurCarte(typeClient type)
        {
            Random rand  = new Random(DateTime.Now.Millisecond);
            int    value = rand.Next(1, 3); //Creer un valeur aleatoire

            //creer un position aléatoire sur la carte
            int      x           = rand.Next(0, Resource.carte_du_monde.Width);
            int      y           = rand.Next(0, Resource.carte_du_monde.Height);
            Position mapPosition = new Position(x, y);

            UsineClient usineClient = new UsineClient();

            TrouverAeroportProche(mapPosition, trouverAvionPourClient(type)).AjouterClient(usineClient.creeClient(type, mapPosition, value));
        }