Esempio n. 1
0
        public List <Customer> Get()
        {
            int             size          = 10;
            int             minPrice      = 100;
            int             maxPrice      = 1000;
            PositionOnMap   positionOnMap = new PositionOnMap();
            List <Customer> customers     = new List <Customer>();

            for (int i = 0; i < size; i++)
            {
                customers.Add(new Customer {
                    Price = RandomNumber.Get(minPrice, maxPrice), Position = positionOnMap.GetPoints(size)[i]
                });
            }
            return(customers);
        }
Esempio n. 2
0
        public List <Customer> Get(List <Customer> customers, List <Employee> nextEmployee)
        {
            PositionOnMap positionOnMap = new PositionOnMap();

            for (int i = 0; i < customers.Count; i++)
            {
                for (int j = 0; j < nextEmployee.Count; j++)
                {
                    if (customers[i].Position.X == nextEmployee[j].Position.X && customers[i].Position.Y == nextEmployee[j].Position.Y)
                    {
                        customers[i].Position = positionOnMap.GetPoints(customers.Count)[i];
                    }
                }
            }
            return(customers);
        }
Esempio n. 3
0
        public List <Employee> GetEmployees()
        {
            int             size          = 10;
            PositionOnMap   positionOnMap = new PositionOnMap();
            List <Employee> employees     = new List <Employee>()
            {
                new Worker {
                    Name = "Bob", Mood = true, Salary = 1000, Position = positionOnMap.GetPoints(size)[0]
                },
                new Worker {
                    Name = "Das", Mood = false, Salary = 2000, Position = positionOnMap.GetPoints(size)[1]
                },
                new Worker {
                    Name = "Rob", Mood = true, Salary = 3000, Position = positionOnMap.GetPoints(size)[2]
                },
                new Worker {
                    Name = "Cob", Mood = true, Salary = 4000, Position = positionOnMap.GetPoints(size)[3]
                },
                new Worker {
                    Name = "Seb", Mood = false, Salary = 5000, Position = positionOnMap.GetPoints(size)[4]
                },
                new Worker {
                    Name = "Gob", Mood = true, Salary = 6000, Position = positionOnMap.GetPoints(size)[5]
                },
                new Boss {
                    Name = "Kob", Mood = false, Salary = 7000, Position = positionOnMap.GetPoints(size)[6]
                },
                new Boss {
                    Name = "Lon", Mood = true, Salary = 8000, Position = positionOnMap.GetPoints(size)[7]
                },
                new Boss {
                    Name = "Nom", Mood = false, Salary = 9000, Position = positionOnMap.GetPoints(size)[8]
                },
                new BigBoss {
                    Name = "Vud", Mood = true, Salary = 10000, Position = positionOnMap.GetPoints(size)[9]
                }
            };

            return(employees);
        }