Beispiel #1
0
        private static string[,] LimitsOfMap(int width, int height, out int PositionX, out int PositionY, ref int tempPositionX, ref int tempPositionY)
        {
            string[,] GameMap = new string[width, height];
            GameMap           = CityMap.StartMap(width, height);
            CityMap.CalculatePosition(out PositionX, out PositionY, ref tempPositionX, ref tempPositionY);

            if (GameMap[PositionX, PositionY] == " ")
            {
                GameMap[PositionX, PositionY] = "X";
            }
            else if (GameMap[PositionX, PositionY] == "D")
            {
                GameMap[PositionX, PositionY] = "B";
            }
            else
            {
                PositionX = tempPositionX - MoveX;
                PositionY = tempPositionY - MoveY;
                GameMap[PositionX, PositionY] = "X";
                tempPositionX = PositionX;
                tempPositionY = PositionY;
            }
            return(GameMap);
        }