public void IncluirComentario() { Peixe peixe = new Peixe("Pacu"); peixe.IncluirComentario(new Comentario("Peixe grande", new Usuario("edubalf", "123mudar", "123mudar"))); Assert.IsTrue(peixe.Comentarios.Count > 0); }
public RelatoDePescaTest() { usuario = new Usuario("*****@*****.**", "123mudar", "123mudar"); comentario = new Comentario("A pesca foi boa", usuario); peixe = new Peixe("Pacu"); peixeCapturado = new PeixeCapturado(peixe, 10, 10); relatoDePesca = new RelatoDePesca(comentario, new DateTime(2015, 6, 9)); }
public PeixeCapturado(Peixe peixe, double peso, double tamanho) { ValidarPeso(peso); ValidarTamanho(tamanho); Id = Guid.NewGuid(); Peixe = peixe; Peso = peso; Tamanho = tamanho; }
public void RemoverComentarioPassandoNovoComentario() { Peixe peixe = new Peixe("Pacu"); Comentario comentario = new Comentario("Peixe grande", new Usuario("edubalf", "123mudar", "123mudar")); peixe.IncluirComentario(comentario); Comentario comentarioParaRemover = new Comentario("Teste", new Usuario("edubalf", "123mudar", "123mudar")); peixe.RemoverComentario(comentarioParaRemover); }
public void RemoverComentario() { Peixe peixe = new Peixe("Pacu"); Comentario comentario = new Comentario("Peixe grande", new Usuario("edubalf", "123mudar", "123mudar")); peixe.IncluirComentario(comentario); peixe.RemoverComentario(comentario); Assert.IsTrue(peixe.Comentarios.Count == 0); }
public void NomeVazio() { Peixe peixe = new Peixe(""); }
public void NomeValido() { Peixe peixe = new Peixe("Pacu"); }
/// <summary> /// Troca o peixe /// </summary> public virtual void AlterarPeixe(Peixe peixe) { Peixe = peixe; }
public string TestarPeixe(Peixe peixe) { return("Sou um peixe"); }
// Update is called once per frame void Update () { vidaEnemy = Enemie.gameObject.GetComponent<UIEnemy>().enemyLife; if (monstroAtivo == "Aguia") { vidaPlayer = Aguia.GetComponent<AguiaBehaviour>().battleLife; } else if (monstroAtivo == "Mamute") { vidaPlayer = Mamute.GetComponent<MamuteBehaviour>().battleLife; } else { vidaPlayer = Peixe.GetComponent<PeixeBehaviour>().battleLife; } //VERIFICAR A DERROTA if (vidaEnemy <= 0) { Aguia.GetComponent<AguiaBehaviour>().AguiaPrefab.SetActive(false); Mamute.GetComponent<MamuteBehaviour>().MamutePrefab.SetActive(false); Peixe.GetComponent<PeixeBehaviour>().peixePrefab.SetActive(false); Peixe.GetComponent<PeixeBehaviour>().UI.SetActive(false); Aguia.GetComponent<AguiaBehaviour>().UI.SetActive(false); Mamute.GetComponent<MamuteBehaviour>().UI.SetActive(false); HabAtk.SetActive(false); HabDef.SetActive(false); Peixe.GetComponent<PeixeBehaviour>().load = false; Aguia.GetComponent<AguiaBehaviour>().load = false; Mamute.GetComponent<MamuteBehaviour>().load = false; Application.LoadLevel("GAME_OVER"); } else if (vidaPlayer <= 0) { Aguia.GetComponent<AguiaBehaviour>().AguiaPrefab.SetActive(false); Mamute.GetComponent<MamuteBehaviour>().MamutePrefab.SetActive(false); Peixe.GetComponent<PeixeBehaviour>().peixePrefab.SetActive(false); Peixe.GetComponent<PeixeBehaviour>().UI.SetActive(false); Aguia.GetComponent<AguiaBehaviour>().UI.SetActive(false); Mamute.GetComponent<MamuteBehaviour>().UI.SetActive(false); HabAtk.SetActive(false); HabDef.SetActive(false); Peixe.GetComponent<PeixeBehaviour>().load = false; Aguia.GetComponent<AguiaBehaviour>().load = false; Mamute.GetComponent<MamuteBehaviour>().load = false; Application.LoadLevel("GAME_OVER"); } //====================== VERIFICAR A DERROA FIM if (Input.GetKey(KeyCode.Escape)) { Aguia.GetComponent<AguiaBehaviour>().AguiaPrefab.SetActive(true); Mamute.GetComponent<MamuteBehaviour>().MamutePrefab.SetActive(true); Peixe.GetComponent<PeixeBehaviour>().peixePrefab.SetActive(true); Peixe.GetComponent<PeixeBehaviour>().UI.SetActive(true); Aguia.GetComponent<AguiaBehaviour>().UI.SetActive(true); Mamute.GetComponent<MamuteBehaviour>().UI.SetActive(true); HabAtk.SetActive(true); HabDef.SetActive(true); Peixe.GetComponent<PeixeBehaviour>().load = false; Aguia.GetComponent<AguiaBehaviour>().load = false; Mamute.GetComponent<MamuteBehaviour>().load = false; Application.LoadLevel("LABORATORIO"); } /*TUDO NOVO*/ if (pressletters == true) { HabAtk.SetActive(false); HabDef.SetActive(false); PressLetters(); //Essa operaçao serve para começar o timer if (clicked == false && timerLetters > 0) { timerLetters -= Time.deltaTime; } //Essa operaçao sera verdeira se o jogador nao conseguir clicar em todas as letras if (clicked == false && timerLetters <= 0) { if (primeiroJogador == true) { penaltyAtk = penaltyAtk + 2; } if (primeiroJogador == false) { penaltyDef = penaltyDef + 2; } SetLetters(); timerLetters = 4.0f; pressletters = false; clickControl = 0; } //Essa operacao serve para quando o jogador conseguir clicar em todas as letras if (clickControl > 6 && clicked == true) { clickControl = 0; timerLetters = 4.0f; SetLetters(); pressletters = false; } } if (pressButton == false && pressletters == false) { if (atkPress == 1) { if (monstroAtivo == "Aguia") { AguiaPrefab.GetComponent<Animator>().SetInteger("animCondition", 1); } else if (monstroAtivo == "Peixe") { PeixePrefab.GetComponent<Animator>().SetInteger("animCondition", 1); } else if (monstroAtivo == "Mamute") { MamutePrefab.GetComponent<Animator>().SetInteger("animCondition", 1); } atk1++; round++; atkPress = 0; } else if (atkPress == 2) { if (monstroAtivo == "Aguia") { AguiaPrefab.GetComponent<Animator>().SetInteger("animCondition", 2); } else if (monstroAtivo == "Peixe") { PeixePrefab.GetComponent<Animator>().SetInteger("animCondition", 2); } else if (monstroAtivo == "Mamute") { MamutePrefab.GetComponent<Animator>().SetInteger("animCondition", 2); } atk2++; round++; atkPress = 0; } if (defPress == 3) { if (monstroAtivo == "Aguia") { AguiaPrefab.GetComponent<Animator>().SetInteger("animCondition", 3); } else if (monstroAtivo == "Peixe") { PeixePrefab.GetComponent<Animator>().SetInteger("animCondition", 3); } else if (monstroAtivo == "Mamute") { MamutePrefab.GetComponent<Animator>().SetInteger("animCondition", 3); } def1++; round++; defPress = 0; } else if (defPress == 4) { if (monstroAtivo == "Aguia") { AguiaPrefab.GetComponent<Animator>().SetInteger("animCondition", 4); } else if (monstroAtivo == "Peixe") { PeixePrefab.GetComponent<Animator>().SetInteger("animCondition", 4); } else if (monstroAtivo == "Mamute") { MamutePrefab.GetComponent<Animator>().SetInteger("animCondition", 4); } def2++; round++; defPress = 0; } } }