static void Main(string[] args) { SoundPlayer Overworld = new SoundPlayer(Path.GetFullPath(@"Music\Overworld.wav")); Overworld.PlayLooping(); Console.Title = "RPG"; char playagain; bool play = true; while (play == true) { Console.SetWindowSize(100, 30); Hero hero = new Hero(30, 5, 1, 0, 0); Map world = new Map(); world.Generate(); world.refresh(); while (hero.HP > 0) { world.refresh(); hero.showstats(); Console.WriteLine("WSAD - nawigacja po mapie"); try { char side = char.Parse(Console.ReadLine()); world.movement(side, ref hero, ref world, Overworld); } catch (FormatException) { } world.refresh(); } Console.Clear(); Console.WriteLine("przegrales! czy chcesz zagrac jeszcze raz? t/n"); try { playagain = char.Parse(Console.ReadLine()); if (playagain == 't') { } else { play = false; } } catch (FormatException) { }; } }