Alex Vestin

Greenhorn
+ Follow
since Nov 07, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex Vestin

Hello,

I've started reading 'Fundamental 2D Game Programming with Java' and came across this code snippet;



What I don't quite understand is what is happening at this line


8 years ago
Thanks for the reply!

The if-statement on 16 was off, since when the points were over 19 line 21 and 23 got unreachable. I removed line 16, and it's working




9 years ago

Campbell Ritchie wrote:And welcome to the Ranch



Thanks!
9 years ago
Hello, I'm back with a question about the Black Jack assignment. I've created a working game that works for one round, aswell as a resetbutton thats able to clear the board of the old hand. However the runGame() loop, which checks wether a player has played his hand seems to freeze the programme the second time around


I know it's probably not optimal having an while loop constantly running to check the status, but I can't seem to figure out why it freezes.

Thanks in advance!
9 years ago
It seems I needed to remove the "Player" at line 1 in the constructor, I'll remove the topic!
9 years ago
Hello!

I've been assigned to create a Black Jack game with a gui.
In this game I've created a seperate Player and Dealer class, and both initiated them, however when I try to call a Player object in a certain way I get a null pointer reference. (It should be noted that the Player object is an array)



And this is how I've initilized the Player class in the constructor



What I don't get is if I change players[i] to dealer, it works fine.

Thanks in advance!
9 years ago