Giter Site home page Giter Site logo

proyectostroopers's People

Contributors

chenaoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

proyectostroopers's Issues

Reporte de malos olores en ResultadoJuegoActivity

En la clase ResultadoJuegoActivity en el método registrarActivity se identificó el mal olor Temporary Field dado que las variables jugador, puntos, correctas, incorrectas, modoJuego no tienen mayor funcionalidad que ser referencias a variables estáticas de otras clases. Además de Switch Statements al existir un bloque condicional que se debe modificar cada vez que se agregue un nuevo nivel, por lo que se viola OCP. Finalmente se halla Dead Code al existir un condicional cuyo cuerpo se encuentra totalmente comentado por lo que no tiene funcionalidad real.

Para solucionarlo, se podría aplicar las técnicas de refactorización Inline Temp, de modo que estas variables estáticas se las llama directamente donde se las requiere, y Replace Conditional with Polymorphism, para que se llame al método que devuelve la dificultad según el nivel de juego, que depende de la clase de tipo NivelActivity que se llame. Además de eliminar el bloque de código muerto.

image

Reporte de malos olores en Utilidades

En la clase Utilidades se identificó Primitive Obsession al existir una variable de tipo int, que posteriormente se utiliza para obtener información de objetos tipo NivelActivity. Por lo que se podría utilizar Replace Data Value with Object, para aprovechar el método propio del objeto que ya devuelve la información que se solicitaba.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.