FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'cardshifter'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download ant.jar (org.apache.ant:ant:1.9.4)
> Failed to download resource 'https://jcenter.bintray.com/org/apache/ant/ant/1.9.4/ant-1.9.4.jar'.
> Connection reset
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
@SimonAndréForsberg It looks neat but it'd be challenging to play for sure
I could imagine at initial map creation, you could either choose between "styles" of map (like in the first Sim City game) or perhaps have a slider to choose balance of land vs. water
I like the way Age of Empires II generate random maps turned out (good variety, decent biome transitions, maps felt random without feeling chaotic), but am struggling to replicate the style. I've attempted using e.g., Perlin noise, but everything comes out either too homogeneous, or if not, the P...
@Phrancis that's not the approach I'm using, but that's an interesting article as well. not sure how easy it would be to adapt it for pure 2d-tile-based stuff
@Simon work on the multiplayer server for UTTT and Battleship, and have a bot fight with maaartinus. And get rid of that reload spam when things are saved
Magic values
int lastGroundTile = marsh ? 6 : 5;
...
world[x][y] = new Tile(new IsoPoint(x, y), IsoTileType.getGroundType(this.game.random.nextInt(lastGroundTile)), ZoneType.NOZONE);
It would be clearer if you would initialize that lastGroundTile to IsoTileType.SOME_CONSTANT.getValue()
Metho...
the only reason i didn't break river and ocean out to other methods is because it felt strange passing the world array into them rather than doing the work in the same method that creates and returns that array
overall very helpful answer @SimonAndréForsberg, thanks
[Cardshifter/Cardshifter]Zomis pushed commit a98dc33e to rules: fixed bug with trample being applied when defending, by adding a causedBy to DamageEvent, also added test for this
@Phrancis it's a way of extracting responsibility for something to another function. It's a way of using Strategy Pattern, which I can recommend reading about:
In computer programming, the strategy pattern (also known as the policy pattern) is a software design pattern that enables an algorithm's behavior to be selected at runtime. The strategy pattern
defines a family of algorithms,
encapsulates each algorithm, and
makes the algorithms interchangeable within that family.
Strategy lets the algorithm vary independently from clients that use it. Strategy is one of the patterns included in the influential book Design Patterns by Gamma et al. that popularized the concept of using patterns in software design.
For instance, a class that performs validation...
[Cardshifter/Cardshifter]Zomis pushed commit 270dbedc to rules: fixed better errormessage instead of NPE when opening deck builder without having selected a deck, fixes #329
[Cardshifter/Cardshifter]Zomis pushed commit 8f80769c to rules: refactored createShadowJars gradle task to be project-individual, changed buildDir for -fx and -server. fixes #303. lesson learned: don't share the buildDir
for example, i want a centered horizontal group for a couple of buttons, and i want to set the size of the buttons because they say Previous and Next and if i don't set a size, they aren't the same size
so i make the group and try to set a size and height when i add the buttons to the group.. well you can't do that like you can with a table
so i try to set the size after creating the buttons, no effect
so i try to set the size of the horizontal group to something else, well that just stretches the whole table funny and doesn't make the buttons any bigger
so instead i just do a Table instead of a HorizontalGroup, size the buttons when i add them to the table, add the table to the other table, and it works exactly like i need