Code Monkey home page Code Monkey logo

fallchallenge2020's People

Contributors

cghbouvet avatar cgjupoulton 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

fallchallenge2020's Issues

Sugerencia de mejora de código con base a principio SOLID - OCP (Open-Closed Principle) y DIP (Dependency-Inversion Principle)

Como sugerencia, en el paquete “com.codingame.game” se puede notar que existe una clase Player, y que estos son llamados en la clase GameSummaryManager junto a otras clases, este estilo de codificación viola el principio OPC y DIP, debido a que no existe una oportunidad en la clase Player, para que esta esté abierta a extensiones y a su vez, todo el proyecto o en este caso el paquete, esté cerrado a modificaciones dejándolo de esa manera como un código muy Estático, por ejemplo; ¿Qué pasaría si alguien externo al proyecto desea agregar otro tipo de Player?, como un VisiterPlayer o ModeratorPlayer, es evidente que la clase GameSummaryManager debería ser modificada para que estos nuevos Players implementen estas funciones y que GameSummayManager solo llame a los métodos abtractos completos, dentro de la clase que extiende de Players. Por ejemplo en el caso de su codificación Llamar a la clase Player como LocalPlayer y crear una nueva clase abstracta Player.
Se adjunta UML con los cambios realizados.
image

Unable to run locally - java: cannot find symbol

I'm pretty new to the CG Platform, but I'm excited to learn more about it and be active in the community. After reading a bunch of articles and forum posts, I'm still unable to set-up a local environment to work on the challenge.
I've cloned this repo, opened it up using IntelliJIdea, and tried running the Default agent, without any modification in the code whatsoever, but the code isn't compiling. It's giving the following error:
image

I'm using OracleJDK v14, and I'm on Windows 10.

Could anyone please guide me what's the problem here and how might I be able to fix it? I want to be able to run and test my code locally so I can use language-specific IDEs and have source-control as well.

Sugerencia de código - Principio SOLID (Violación a Liskov-Substitution Principle (LSP) y Single-Responsabilty Principle (SRP)).

Saludos cordiales compañero de programación, analizando su código hemos identificado ciertas partes que pueden ser mejoradas a partir de las bases teóricas que se indican en los principios SOLID, según nuestro análisis, en el paquete “com.codingame.game.action” y en el paquete “com.codingame.game.spell existen clases abstractas (Action, Spell) que implementa métodos que deben ser totalmente suplantados por las clases hijas, sin embargo hemos podido notar que maneja estos métodos en la clase padre y posterior mente en las clases hijas, esto viola el principio SOLID - LSP y SRP debido a que una clase hija no está reemplazando completamente las funcionalidades del padre a y a su vez, esta clases padre contiene métodos que no tienen una responsabilidad única, es decir, esta no se comporta totalmente como la clase Superior y no cumple SRP.
Nuestra sugerencia es eliminar estos métodos de la clase padre y solo ponerlos cuando sea necesario, dentro de las clases hijas que tengan un comportamiento diferente al del padre. De esta manera tambien, al resto de código, le sugerimos por ejemplo que no ejecute directamente (Action.isWait()) sino que ejecute (Action instanceof WaitAction) para de esa manera conocer si la clase actual contiene o no los métodos que necesite.
Adjuntamos UML sugerencias:
image
image

compilation failure

Hi,

There is a compilation error: Game.java:[578,23] incompatible types: java.util.Optional<java.lang.Object> cannot be converted to java.util.Optional<com.codingame.game.spell.Spell>

You will find below the details:

Java version: java full version "15.0.1+9-18"

Maven version:

Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
Maven home: /usr/local/Cellar/maven/3.5.2/libexec
Java version: 15.0.1, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.2", arch: "x86_64", family: "mac"

Below the output while trying to compile the project:

mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.codingame.game:fall-2020:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.codingame.gameengine:module-endscreen:jar -> duplicate declaration of version ${gamengine.version} @ line 47, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building fall-2020 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ fall-2020 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 38 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ fall-2020 ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 27 source files to /Volumes/HD2/X/github/CodinGame/FallChallenge2020/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Volumes/HD2/X/github/CodinGame/FallChallenge2020/src/main/java/com/codingame/game/Game.java:[577,35] cannot find symbol
  symbol:   method getId()
  location: variable spell of type java.lang.Object
[ERROR] /Volumes/HD2/X/github/CodinGame/FallChallenge2020/src/main/java/com/codingame/game/Game.java:[578,23] incompatible types: java.util.Optional<java.lang.Object> cannot be converted to java.util.Optional<com.codingame.game.spell.Spell>
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.399 s
[INFO] Finished at: 2021-01-20T14:23:57+01:00
[INFO] Final Memory: 17M/80M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fall-2020: Compilation failure: Compilation failure:
[ERROR] /Volumes/HD2/X/github/CodinGame/FallChallenge2020/src/main/java/com/codingame/game/Game.java:[577,35] cannot find symbol
[ERROR]   symbol:   method getId()
[ERROR]   location: variable spell of type java.lang.Object
[ERROR] /Volumes/HD2/X/github/CodinGame/FallChallenge2020/src/main/java/com/codingame/game/Game.java:[578,23] incompatible types: java.util.Optional<java.lang.Object> cannot be converted to java.util.Optional<com.codingame.game.spell.Spell>
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Kind regards
Cyrille

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.