Coder Social home page Coder Social logo

avatar-battle-card-game's People

Contributors

davidgozaly17 avatar faridlazuarda avatar irfaandzakiy avatar mfauzanalg avatar mrizkinash avatar

Watchers

 avatar  avatar  avatar

avatar-battle-card-game's Issues

Using constants as skill effect

Look at this.

https://github.com/mfauzanalg/Tubes-2-OOP-CardGame/blob/fec1e1b69d75538230a32cf2c1c4168c184fbab3/src/main/java/com/avatarduel/component/AuraSkillCard.java#L6-L16

One day, if you are going to check the skill card, you have to code like skillCard.getEffect().equals("aura"). But wait, is it really "aura", "AURA", or "Aura"? Or maybe "AuraEffect"? This may lead to bigger bugs. Better if you have

class SkillCard {
  public static final String EFFECT_AURA = "aura";
}

// somewhere
    skillCard.getEffect().equals(SkillCard.EFFECT_AURA);

So if you wont get any typo. At least, if you type effect_aura, you will get compile error.

Moreover you can change the String to int, so you can have skillCard.getEffect() == SkillCard.EFFECT_AURA.

This issue is only a suggestion. You may argue with it (not all the suggestions are true), challenge it, or come up with another idea yourself. Please kindly close this issue after you feel this issue is irrelevant / solved.

Refactoring BoardCard

You have attackPos and isPowerUp in your BoardCard. However, the only one with those two attribute is character. Why don't rename it to BoardCharacterCard ?

https://github.com/mfauzanalg/Tubes-2-OOP-CardGame/blob/fec1e1b69d75538230a32cf2c1c4168c184fbab3/src/main/java/com/avatarduel/component/BoardCard.java#L9-L19

This issue is only a suggestion. You may argue with it (not all the suggestions are true), challenge it, or come up with another idea yourself. Please kindly close this issue after you feel this issue is irrelevant / solved.

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.