oyachai / HearthSim

Generic Hearthstone game simulator
MIT License
316 stars 59 forks source link

Quick Start #56

Open celsofranssa opened 9 years ago

celsofranssa commented 9 years ago

Hello,

I really liked the project and I am very interested in it. However, to understand it and be able to contribute, I would import it into an IDE (Eclipse or Netbeans). Is there a project created for any IDE? If not, how can I turn the source code in an IDE project? Thank you very much. Celso.

oyachai commented 9 years ago

Hi,

I don't know about Netbeans, but for Eclipse, you can build the project files by running

./gradlew eclipse

from the command line, assuming you are in the project directory.

celsofranssa commented 9 years ago

Thank you so much. Now I'm trying to understand the code.

celsofranssa commented 9 years ago

Is there any way to get a overview about the project? I would like to figure out how the card mechanics and game mechanics is implemented.

MrHen commented 9 years ago

@Ceceu I'm not sure anyone has typed up a quick overview of how things are implemented. A super quick primer: There are two major ways that things are implemented. Things like health, attack or other simple stats are loaded directly from the .json file we save that has all the card data. You can see them getting imported here: https://github.com/oyachai/HearthSim/blob/master/src/main/groovy/com/hearthsim/card/ImplementedCardList.groovy#L123. I have a bunch of PRs out right now that add even more stuff to that import.

Things that are more complicated (e.g. battlecries) are added to the individual card classes. An example of how that works can be found here: https://github.com/oyachai/HearthSim/blob/master/src/main/java/com/hearthsim/card/minion/concrete/AbusiveSergeant.java.

Those two areas should give you a starting place. If you have specific questions let me know and I'll try to answer them.