Exemple #1
0
 static void Main(string[] args)
 {
     Game game = new Game();
     game.Start();
 }
Exemple #2
0
        public void Init()
        {
            Instance = this;

            // init log
            log = new StreamWriter("log.txt");
            log.WriteLine("Hunters - version 0");
            log.WriteLine(DateTime.Now.ToString());
            log.Flush();

            Item.LoadItems();

            // init console
            Console.Init("Hunters", 70, 26, 20);
            screen_size = new Pos(70, 20);
            map = new Map(50, 50);

            // start menu
            Console.Clear();
            string logo = @" .-. .-..-. .-..-. .-. _______ ,---.  ,---.    .---.
             | | | || | | ||  \| ||__   __|| .-'  | .-.\  ( .-._)
             | `-' || | | ||   | |  )| |   | `-.  | `-'/ (_) \
             | .-. || | | || |\  | (_) |   | .-'  |   (  _  \ \
             | | |)|| `-')|| | |)|   | |   |  `--.| |\ \( `-'  )
             /(  (_)`---(_)/(  (_)   `-'   /( __.'|_| \)\`----'
            (__)          (__)            (__)        (__)       ";

            Console.WriteText2(logo);
            Console.WriteText2("\nCreated by Tomashu - Version 0\n\nYour name: ");
            player_name = Console.GetText();
            if (player_name == null)
                Environment.Exit(0);

            // try load save
            if(!TryLoad())
                NewGame();
        }