Fun Stuff > CLIKC
A programming thread!
ChaoSera:
I suppose screenHeight and HEIGHT_SCREEN_PADDING don't have the same value? Also there might be cast errors if some of the values are integers. Casting from int to double does not always work as good as one might expect.
Masterpiece:
The values are not the same.
What would you do instead of casting?
ChaoSera:
Declare them as double to begin with, unless you're limited by some external framework. Alternatively cast them explicetly to double, which might help as well.
Another method, although not a pretty one, would be to create Integer objects from the int values and then use the doubleValue() of those objects.
Sorflakne:
So for a final project in my web publishing class, I'm making a Monopoly clone. However, things...got off to a hairy start. We were given a base of code to build off of that included the game board, players, and an auto-mover that moves each piece in turn on page refresh. We have to build the rest of the game. My partner and I got it to where an actual dice roller is working, but each page refresh not brings back a random number of errors; sometimes only three, sometimes, as the pic shows, only three thousand...
As you can see, I'm still able to make fun of myself, so maybe there's hope.
Masterpiece:
Reminds me of this:
[tweet]484373063077998592[/tweet]
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version