-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgramP4.cs
35 lines (25 loc) · 983 Bytes
/
ProgramP4.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
Pajaro[] equipo = new Pajaro[] { new Pajaro("Rojo"), new Pajaro("Negro"), new Pajaro("Amarillo")}; //Objetos anonimos
Console.WriteLine("\n Pajaros del juego: ");
for (int i = 0; i <equipo.Length ; i++)
{
Console.WriteLine($" {equipo[i].Color}");
}
Console.WriteLine();
Juego[] game = new Juego[] { new Juego("Rojo", "Golpeo"), new Juego("Negro", "Exploto"), //Objetos anonimos
new Juego("Amarillo", "Golpeo rapido y fuerte") };
for (int i = 0; i < game.Length; i++)
{
Console.WriteLine($"El Pajaro {game[i].Color} se lanzo y {game[i].Habilidad}");
}
Console.ReadLine();
}
}