public GothamCity() { var batgirl = new Batgirl(null); var robin = new Robin(batgirl); var batman = new Batman(robin); _protector = batman; }
public void Setup() { bastonDeMetal = new Arma(15, 30); bombasDeHumo = new Arma(14, 89); robin = new Robin(new List <Arma> { bastonDeMetal, bombasDeHumo }, 10); raven = new Raven(2); chicoBestia = new ChicoBestia(2); }
public void Setup() { bastonDeMetal = new Arma(15, 10); bombasDeHumo = new Arma(14, 89); arsenalDeRobin = new List <Arma>(); arsenalDeRobin.Add(bastonDeMetal); arsenalDeRobin.Add(bombasDeHumo); RicardoTapia = new Robin(arsenalDeRobin, 10); HulkJR = new ChicoBestia(2); raven = new Raven(2); }
static void CallsForVertebrates() { Rattlesnake rattlesnake = new Rattlesnake(); Robin robin = new Robin(); Fish fishy = new Fish(); Dog doggy = new Dog(); Console.WriteLine($"A rattlesnake makes the sound {rattlesnake.Sound()}"); Console.WriteLine($"Can I swim? {robin.Swim()}"); Console.WriteLine($"Can I fly? {fishy.Fly()}"); Console.WriteLine($"Most of the time I have {doggy.HasLegs} legs, and makes the sound {doggy.Sound()}"); }
static void Heroes() { var robin = new Robin(); var batman = new Batman(robin); var joker = new Joker(); var harleyQuinn = new HarleyQuinn(); batman.Goto("Bludhaven"); batman.Fight(harleyQuinn); batman.Fight(joker); batman.Goto("Hall of Justice"); }
public void Setup() { BastonDeMetal = new Arma(10, 15); BombaDeHumo = new Arma(89, 14); robin = new Robin(new List <Arma> { BombaDeHumo, BastonDeMetal }, 10); chicobestia = new Chico_Bestia("Verde", 2); raven = new Raven(new List <string> { "Extraño a mi Papi", "Me quedé sin MANTECA", "Perdí a Pipo", "Voy a comprar pilas para Robocop", "¿Donde esta Pipo?" }, 2); }
public void Setup() { BastonDeMetal = new Arma(10, 15); BombaDeHumo = new Arma(89, 14); robin = new Robin(new List <Arma> { BombaDeHumo, BastonDeMetal }, 10); chicobestia = new Chico_Bestia("Verde", 2); raven = new Raven(new List <string> { "odio a Papi", "Tengo mucha MANTECA", "F por Pipo", "el Robocop tiene la peor temporada", "donde te sentaste Pipo" }, 2); }
static void Heroes() { var mediator = new TowerOfJustice(); var batman = new Batman(mediator); var superman = new Superman(mediator); var robin = new Robin(mediator); superman.send(new HeroMessage("Help needed in Metropolis!", batman, robin)); batman.send(new HeroMessage("On the way to Metropolis!", superman)); batman.send(new HeroMessage("Help needed in Gotham City!", superman, robin)); superman.send(new HeroMessage("On the way to Gotham City!", batman)); robin.send(new HeroMessage("On the way!", batman)); }
public void Setup() { //ROBIN bastonDeMetal = new Arma(10, 15); bombasDeHumo = new Arma(89, 14); arsenal = new List <Arma> { bastonDeMetal, bombasDeHumo }; robin = new Robin(arsenal, 10); //RAVEN pensamientos = new List <string> { "Extraño a mi Papi", "Me quedé sin MANTECA", "Perdí a Pipo", "Voy a comprar pilas para Robocop", "¿Donde esta Pipo?" }; raven = new Raven(2, pensamientos, 0); //CHICOBESTIA chicobestia = new ChicoBestia("Verde", 2); }
static void Main(string[] args) { //Animal.Animal beast = new Animal.Animal(); //beast.Talk(); //beast.Greet(); //beast.Sing(); Dog bowser = new Dog(); bowser.Talk(); bowser.Greet(); bowser.Sing(); bowser.Fetch("stick"); bowser.FeedMe(); bowser.TouchMe(); Robin red = new Robin(); red.Talk(); red.Greet(); red.Sing(); //red.Fetch("worm"); //red.FeedMe(); //red.TouchMe(); Mosquito buzzy = new Mosquito(); buzzy.Fly(); Horse gerald = new Horse(); gerald.Ride(); Griffon flamel = new Griffon(); flamel.Fly(); flamel.Ride(); Console.ReadKey(); }
public FetchData GetArchiveData(DatabaseData databaseData, string dataSourceName, ArcDef archiveDefinition) { RrdDb database = null; try { database = new RrdDb(databaseData.Definition.getPath(), true); int datasourceIndex = database.getDsIndex(dataSourceName); Archive archive = database.getArchive(new ConsolFun(archiveDefinition.getConsolFun().Name), archiveDefinition.Steps); Robin robin = archive.getRobin(datasourceIndex); double[] values = robin.getValues(); DateTime archiveStartTime = archive.getStartDateTime(); TimeSpan tick = new TimeSpan(archive.getArcStep() * TimeSpan.TicksPerSecond); FetchData fetchedData = new FetchData(archive.getArcStep(), archive.getEndTime(), new string[] { dataSourceName }); long[] timestamps = new long[archive.getRows()]; long offset = archive.getStartTime(); for (var i = 0; i < archive.getRows(); i++) { timestamps[i] = offset; offset += archive.getArcStep(); } fetchedData.setTimestamps(timestamps); double[][] value = new double[1][]; value[0] = values; fetchedData.setValues(value); return(fetchedData); } finally { if (database != null) { database.close(); } } }
public void CanProveRobinIsDerivedFromAnimal() { Robin rob = new Robin(); Assert.Equal("Food", rob.Eat()); }