public void Lizard_IsCrushed_By_Rock() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Lizard.GetInstance(), Rock.GetInstance()); Assert.AreEqual("Rock", item); }
protected override void OnSetUp() { var mother = new Lizard { BodyWeight = 48, Description = "Mother", Children = new List <Animal>() }; var father = new Lizard { BodyWeight = 48, Description = "Father", Children = new List <Animal>() }; var child = new Lizard { Mother = mother, Father = father, BodyWeight = 48, Description = "Child", }; mother.Children.Add(child); father.Children.Add(child); using (var session = OpenSession()) using (var transaction = session.BeginTransaction()) { session.Save(mother); session.Save(father); session.Save(child); transaction.Commit(); } }
public void Paper_IsEaten_ByLizard() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Paper.GetInstance(), Lizard.GetInstance()); Assert.AreEqual("Lizard", item); }
public void Rock_Crushes_Lizard() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Rock.GetInstance(), Lizard.GetInstance()); Assert.AreEqual("Rock", item); }
// usage examples. private static void Main(string[] args) { var donkeyInstance = new Donkey(); var lizardInstance = new Lizard(); var snakeInstance = new Snake(); var tableInstance = new Table(); var deskInstance = new Desk(); var conferenceTalbeInstance = new ConferenceTable(); var listOfThingsWithLegs = new ListOfIhasLegs { donkeyInstance, lizardInstance, tableInstance, deskInstance, conferenceTalbeInstance }; var listOfAnimals = new ListOfAnimals { donkeyInstance, lizardInstance, snakeInstance }; var cageOfAnimalsWithLegs = new ListOfAnimalsWithLegs { donkeyInstance, lizardInstance, }; }
public void Scissor_Decapitate_Lizard() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Scissor.GetInstance(), Lizard.GetInstance()); Assert.AreEqual("Scissor", item); }
public void Lizard_Draws_Lizard() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Lizard.GetInstance(), Lizard.GetInstance()); Assert.AreEqual("Draw", item); }
public void Lizard_Eats_Paper() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Lizard.GetInstance(), Paper.GetInstance()); Assert.AreEqual("Lizard", item); }
public void Spock_IsPoisoned_ByLizard() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Spock.GetInstance(), Lizard.GetInstance()); Assert.AreEqual("Lizard", item); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); debugTex = new Texture2D(GraphicsDevice, 1, 1); Color[] white = { new Color(1f, 1f, 1f) }; debugTex.SetData(white); BgTile.addTexture(Content.Load <Texture2D>("dirtText")); BgTile.addTexture(Content.Load <Texture2D>("grassText")); BgTile.addTexture(Content.Load <Texture2D>("floorText")); BgTile.addTexture(Content.Load <Texture2D>("waterText")); BgTile.addTexture(Content.Load <Texture2D>("rockText")); BlockTexture.addTexture(Content.Load <Texture2D>("woodBlockText")); BlockTexture.addTexture(Content.Load <Texture2D>("treeBlockText")); Lizard.initLizard(Content.Load <Texture2D>("liz"), Content.Load <Texture2D>("dest")); this.player = new Player(new Camera(GraphicsDevice.Viewport), Content.Load <Texture2D>("cursor"), Content.Load <Texture2D>("indicator"), new Vector2(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height)); Lizard.player = player; this.world = new World(player); player.Init(this.world); }
public void Lizard_IsDecapitated_ByScissor() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Lizard.GetInstance(), Scissor.GetInstance()); Assert.AreEqual("Scissor", item); }
public void Lizard_Poisons_Spock() { var gameMatch = new GameMatch(); string item = gameMatch.Decide(Lizard.GetInstance(), Spock.GetInstance()); Assert.AreEqual("Lizard", item); }
protected override void OnSetUp() { var mother = new Lizard { BodyWeight = 48, Description = "Mother", Children = new List<Animal>() }; var father = new Lizard { BodyWeight = 48, Description = "Father", Children = new List<Animal>() }; var child = new Lizard { Mother = mother, Father = father, BodyWeight = 48, Description = "Child", }; mother.Children.Add(child); father.Children.Add(child); using (var session = OpenSession()) using (var transaction = session.BeginTransaction()) { session.Save(mother); session.Save(father); session.Save(child); transaction.Commit(); } }
private void SpawnLizard() { Lizard lizzie = Core.theTM.CreateLizard(x, y); lizzie.lizardName = lizardNames[Random.Range(0, lizardNames.Length)]; TextTicker.AddLine("<color=pink>" + lizzie.lizardName + " has hatched</color>"); }
public IActionResult Edit(int lizardId) { // Queries the database for the lizard that has same id as lizardId Lizard Edit = dBContext.Lizards.FirstOrDefault(l => l.LizardId == lizardId); return(View(Edit)); }
public IActionResult Destroy(int lizardId) { Lizard walkThePlank = dBContext.Lizards.FirstOrDefault(l => l.LizardId == lizardId); dBContext.Lizards.Remove(walkThePlank); dBContext.SaveChanges(); return(Redirect("/lizards")); }
public void Start() { //Assigning variables _src = GetComponent <Lizard>(); _gameManager = FindObjectOfType <GameManager>(); _currentState = State.CHOOSETARGET; _hitbox.Initialise(_src); _hitbox.ToggleTriggers(true); }
private static void Lizard_Bite(On.Lizard.orig_Bite orig, Lizard self, BodyChunk chunk) { //Create small emitter when a Lizard bites are creature orig.Invoke(self, chunk); if (chunk != null && chunk.owner is Creature) { self.room.AddObject(new BloodEmitter(null, chunk, UnityEngine.Random.Range(1f, 5f), 0.08f)); } }
private void OnHitboxEnter(Lizard other) { other.Knockback(_direction, _knockbackData); if (OnWeaponHit != null) { OnWeaponHit(other); } }
public static void Save() { currentLizard = Lizard.current; BinaryFormatter bf = new BinaryFormatter(); FileStream file = File.Create(Application.persistentDataPath + "/savedGame.arl"); bf.Serialize(file, currentLizard); file.Close(); }
public void Scissors_Decapitate_Lizard() { var s = new Scissor(); var p = new Lizard(); var r = s.Engage(p); Assert.Equal(r, true); }
void OnTriggerStay2D(Collider2D collider) { Lizard lizard = collider.gameObject.GetComponent <Lizard> (); if (lizard) { anim.SetBool("isAttacked Bool", true); } }
public IActionResult Edit(int lizardId) { // Queries the database for the lizard that has same id as lizardId // dBContext.Lizards is how we called it in MyContext.cs // in l.LizardId LizardId is written as is bc it is how we called it in our class from Lizard.cs // page should come pre-populated bc it has the model Lizard on the Edit.cshtml and bc we sent edit thru then that the instance of Lizard that its pulling from Lizard Edit = dBContext.Lizards.FirstOrDefault(l => l.LizardId == lizardId); return(View(Edit)); }
public static void OnSetSkillData(Player.SkillState skill) { if (Lizard.IsInterface <IModSkill>(skill)) { skill.skillID = Lizard.GetID(skill); skill.name = skill.skillID; ModManager.LoadModSkillStatData(skill.parent, (IModSkill)skill); } }
public void LizardInheritsFromReptile() { // Arrange Lizard liz = new Lizard(); // Act bool actual = liz.LaysEggs; // Assert Assert.False(actual); }
public bool Farm() { fSkinProgress += Time.deltaTime; lizardToSend = task.assignedLizard; SetTaskCompletion(fSkinProgress / fTAILOR_TIME); return(fSkinProgress >= fTAILOR_TIME); }
public void LizardEatingHumansReturnsString() { // Arrange Lizard lizzy = new Lizard(); // Act string actual = lizzy.EatingHumans(); string expected = "They are saltier than I remember!"; // Assert Assert.Equal(expected, actual); }
public bool AddLizard(int index, Lizard lizard) { if (this.lizards[index] == null) { this.lizards[index] = lizard; //lizard.tile = this; return(true); } return(false); }
public Lizard RemoveLizard(int index) { if (lizards[index] != null) { Lizard liz = lizards[index]; liz.tile = null; lizards[index] = null; return(liz); } return(null); }
public void DecFarmers() { if (GetNumFarmers() >= 1) { Lizard liz = lizards[Lizard.Assignment.FARMER][0]; lizards[Lizard.Assignment.FARMER].RemoveAt(0); liz.AbandonTask(); liz.assignment = Lizard.Assignment.WORKER; lizards[Lizard.Assignment.WORKER].Add(liz); } }
public void DecTailors() { if (GetNumTailors() >= 1) { Lizard liz = lizards[Lizard.Assignment.TAILOR][0]; lizards[Lizard.Assignment.TAILOR].RemoveAt(0); liz.AbandonTask(); liz.assignment = Lizard.Assignment.WORKER; lizards[Lizard.Assignment.WORKER].Add(liz); } }
public void LizardLayingEggsReturnsString() { // Arrange Lizard lizzy = new Lizard(); // Act string actual = lizzy.LayingEggs(); string expected = "Whoops, that\'s not an egg..."; // Assert Assert.Equal(expected, actual); }
protected override void OnSetUp() { base.OnSetUp(); using (ISession session = this.OpenSession()) { Animal animal = new Animal() { Id = 1, BodyWeight = 2, Sex = Sex.Undefined, Description = "Animal", SerialNumber = "111" }; Lizard lizard = new Lizard() { Id = 2, BodyTemperature = 98, BodyWeight = 10, Sex = Sex.Male, Description = "Lizard", SerialNumber = "222", Mother = animal }; Dog momDog = new Dog() { BirthDate = new DateTime(2007, 01, 01), BodyWeight = 65, Sex = Sex.Female, Description = "MyDogMom", Pregnant = false, SerialNumber = "333" }; Dog dadDog = new Dog() { BirthDate = new DateTime(2007, 02, 02), BodyWeight = 75, Sex = Sex.Male, Description = "MyDogDad", Pregnant = false, SerialNumber = "444" }; Dog puppy = new Dog() { BirthDate = new DateTime(2010, 01, 01), BodyWeight = 50, Sex = Sex.Male, Description = "Puppy", Pregnant = false, Father = dadDog, Mother = momDog, SerialNumber = "555" }; Cat cat = new Cat() { BirthDate = new DateTime(2007, 03, 03), BodyWeight = 10, Sex = Sex.Female, Description = "MyCat", Pregnant = true, SerialNumber = "777" }; session.Save(animal); session.Save(lizard); session.Save(momDog); session.Save(dadDog); session.Save(puppy); session.Save(cat); session.Flush(); } }
public bool Engage(Lizard p) { return true; }