Exemplo n.º 1
0
        public void Init(Point newDimensions) //(int newHorizontal, int newVertical)
        {
            theMap     = new AMap();
            horizontal = (newDimensions.X) - 1;
            vertical   = (newDimensions.Y) - 1;

            theMap.Tiles = MapCreator.CreateMap(newDimensions.X, newDimensions.Y);
        }
Exemplo n.º 2
0
        public void Clear()
        {
            int x, y;

            x = theMap.Tiles.GetLength(0);
            y = theMap.Tiles.GetLength(1);

            theMap             = new AMap();
            theMap.Tiles       = MapCreator.CreateMap(x, y);
            theMap.TheTheseus  = null;
            theMap.TheMinotaur = null;
        }
Exemplo n.º 3
0
        internal void Init(AMap newMap)
        {
            /***
             * Initialise map variables - width & height
             * */
            theMap = newMap;
            int length;

            mapArray = theMap.Map;

            length = mapArray[0].Length;

            x = (length - 1) / 4;
            y = (mapArray.Length - 1) / 2;

            Console.WriteLine("x = {0}, y = {1}", x, y);

            newMap.Tiles = MapCreator.CreateMap(x, y);
        }
Exemplo n.º 4
0
        public string[] Export()
        {
            string theString = MapCreator.ObjectsToString(theMap.Tiles, theMap.TheTheseus, theMap.TheMinotaur);

            return(MapCreator.ConvertToStringArray(theString));
        }