Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Array
- {
- class Program
- {
- static void Main(string[] args)
- {
- int [] monsterList = new int[] {1,2,3,4,5};
- int[] monsterHp = new int[] { 5, 6, 7, 8, 9 };
- string[] monsterNames = new string[] { "Imp", "Goblin", "Skeleton", "Zombie", "Orc" };
- while (true)
- {
- Random spawn = new Random();
- int spawned = spawn.Next(0, 5);
- if (spawned == 0)
- {
- Console.WriteLine("An " + monsterNames[spawned] + " appeard!");
- Console.WriteLine("Monster Health: " + monsterHp[spawned]);
- Console.ReadLine();
- }
- if (spawned == 5)
- {
- Console.WriteLine("An " + monsterNames[spawned] + " appeard!");
- Console.WriteLine("Monster Health: " + monsterHp[spawned]);
- Console.ReadLine();
- }
- else
- {
- Console.WriteLine("A " + monsterNames[spawned] + " appeard!");
- Console.WriteLine("Monster Health: " + monsterHp[spawned]);
- Console.ReadLine();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement