Exemple #1
0
        //private Player playerTest = new Player("Pesho", 100, new List<Ability>(), new Point(0, 0));
        public static void StartGame()
        {
            MapFactory mapFactory = new MapFactory();
            Map = mapFactory.GenerateMap(Maptypes.FirstLevelMap);
            Map.Print(); // insert validations for different maps

            Player playerTest = new Player(new Point(1, 1), "Pesho", 100, new List<Ability> { new Ability(1, 1, AbilityType.Offensive) });
            Console.SetCursorPosition(122, 0);
            Console.Write("Level: {0}", playerTest.Level);
            while (true)
            {
                CheckForPressedKey(playerTest);
            }
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            Engine.GameSettings(160, 50);

            #region testing simple map factory design pattern
            //Factory design pattern logic
            MapFactory mapFactory = new MapFactory();
            Map map = mapFactory.GenerateMap(Maptypes.FirstLevelMap);
            Console.WriteLine(map.Content);
            #endregion

            Engine.StartGame();

            #region Testing draw class
            //List<string> strList = new List<string> { " __/\")", "(___/", " ^ ^ " };

            //Point point = new Point();
            //point.CoordX = 5;
            //point.CoordY = 5;

            //Draw draw = new Draw();
            //draw.Print(point, strList);

            //for (int i = 0; i < 20; i++)
            //{
            //    Point newPoint = new Point();
            //    newPoint.CoordX = point.CoordX + 1;
            //    newPoint.CoordY = point.CoordY;
            //    Thread.Sleep(100);
            //    draw.Move(point, newPoint, strList);
            //    point.CoordX = newPoint.CoordX;
            //    point.CoordY = newPoint.CoordY;
            //}

            //for (int i = 0; i < 20; i++)
            //{
            //    Point newPoint = new Point();
            //    newPoint.CoordX = point.CoordX + 1;
            //    newPoint.CoordY = point.CoordY + 1;
            //    Thread.Sleep(100);
            //    draw.Move(point, newPoint, strList);
            //    point.CoordX = newPoint.CoordX;
            //    point.CoordY = newPoint.CoordY;
            //}

            #endregion
        }