Tag Info

Hot answers tagged

2

I think the fastest method will be by not generating the numbers at board generation (I know it's almost cheating). It's most likely fastest to only generate the number when the player clicks on a square rather then during board generation. Secondly consider how you are going to generate mines, is each place on the board going to pass a check (loop over ...


2

Because of type erasure you lose the compile time type information of generics when transmitting data over network. If you need it on the receiving side again, you have to put the type information back yourself somehow. It's impossible to say how you should do this, but typically it involves either enums or class names and some type casting.


2

JNI is a way to go if you want full access, but the Steamworks Web API might be an easier way to go. It's basically an HTTP/HTTPS-based channel to the Steamworks functions, designed to be instantly compatible with access from Java, Python, Ruby, and really anything that isn't intrinsically C/C++. Of course you know that the issue with JNI is that you would ...


1

A nice way to implement what you are trying to achieve would be to use a SequenceAction and built in libgdx actions : tooltip.addAction(Actions.sequence( Actions.show(), Actions.fadeIn(1f), Actions.delay(4.5f), Actions.fadeOut(1f), Actions.hide()) ) Actions.show() basically call setVisible(true) on your actor and Action.hide() call ...


1

Create two dimensional array Randomly place mines and place mine location to list Foreach mines and add +1 to adjacent cells Mine creation int x = random.next(min, max); int y = random.next(min, max); mineList.add(new XYClass(x,y)) Number calculation Foreach(XYClass xy : mineList) addPlusOneToAdjacentCells(xy); This way, you don't even have to ...


1

Are all coins doing the same animation? You could make a method in the Animation class that takes a coin as an argument, then performs the animation on that coin. Then, on another class, you make a loop that traverses the coin list and calls the method in your Animation class, therefore animating each coin as you go through the list. You can also add delay ...


1

The way I solved this a long time back (I forgot about this question entirely until now), was that I just basically checked if the boxes intersected, because the rotation was just for a first person camera. So it only would have effected the viewport and movement code, the actual collision was just checking for an intersection. Basically, it was just me over ...



Only top voted, non community-wiki answers of a minimum length are eligible