Exemple #1
0
        static void Main(string[] args)
        {
            Data data = new Data();
            BigField fieldB = new BigField();
            OutInfo info = new OutInfo();

            Console.Write(info.BigArrayShip(fieldB));

           // fieldB.Choise(1, 1); так выглядит ход

            //for (byte i = 1; i < 11; i++) // ход в цыкле 
            //{
            //    for (byte a = 1; a < 11; a++)
            //    {
            //        fieldB.Choise(i, a);
            //    }
            //}


            //Console.Write(info.BigArrayShip(fieldB));
            //Console.Write(info.BigArrayEmpty(fieldB));
            //Console.Write(info.BigArrayBufferZona(fieldB));
            //Console.Write(info.BigArrayKnown(fieldB));
            //Console.Write(info.BigArrayKilled(fieldB));
            //Console.Write(info.BigArrayWounded(fieldB));



            Console.Read();
        }
        public async static Task<RoomGeometryViewModel> CreateFromRoom(Room room)
        {
            Data data = new Data();

            double[] projectedEdgeHeights = room.Edges.Select(e => e.ProjectedHeight).ToArray();
            double focalDistance = await data.GetFoucsDistance();

            List<double> distances = Measurer.GetEdgeDistances(
                projectedEdgeHeights,
                focalDistance,
                room.ProjectedReferenceHeight,
                room.ActualReferenceHeight);

            List<double> orientations = room.Edges.Select(e => e.ZRotation).ToList();

            List<double> actualWallSizes = Measurer.GetActualWallSizes(distances, orientations);

            RoomGeometryViewModel roomGeometry = new RoomGeometryViewModel(distances, orientations, actualWallSizes);

            return roomGeometry;
        }
Exemple #3
0
        public void Setup()
        {
            Data = new Data();
            ShotList = new List<Shot>();

            Random rand = new Random();

            GameSetup setup = LoadGameSetupFile(Args[0]);
            for (int id = 0; id < setup.Players.Count; id++)
            {
                LoadPlayer(setup.Players[id], id);
                Data.PlayerDict[id].AI.SetRandomSeed(rand.Next(100));
            }
            LoadMap(setup.Map);
        }