Hey again and Merry Christmas
Before you read on, I realize I could've used arraylists to do the job better and probably much much easier, but this is a learning project to use arrays only...like a challenge to myself to become more familiar and comfortable with using arrays in a bigger project than I usually do
I have fleshed out the card game I posted on here throughout this month, and now that it's almost functional, I've come across some problems.
I am fairly new to java still, and to be honest I kind of don't really know if and when I'm going about something the wrong way. So as you read through my code you will maybe notice things that don't really seem to make sense for a seasoned java user, but please understand that I'm kind of trying to make this work with the small amount of tools that I know how to use, so please be aware of that. Also, as a beginner my code is probably not the cleanest.
So I'm getting a null pointer exception on line97 99 of my card class, and it's leading me to believe that my dealHands method is not doing what it's supposed to, which is populate Player One's hand array with references to Cards in Card.deck.
Anyway here's my four classes (again, it's not the best design or cleanest code, but I'm still learning)
Before you read on, I realize I could've used arraylists to do the job better and probably much much easier, but this is a learning project to use arrays only...like a challenge to myself to become more familiar and comfortable with using arrays in a bigger project than I usually do
I have fleshed out the card game I posted on here throughout this month, and now that it's almost functional, I've come across some problems.
I am fairly new to java still, and to be honest I kind of don't really know if and when I'm going about something the wrong way. So as you read through my code you will maybe notice things that don't really seem to make sense for a seasoned java user, but please understand that I'm kind of trying to make this work with the small amount of tools that I know how to use, so please be aware of that. Also, as a beginner my code is probably not the cleanest.
So I'm getting a null pointer exception on line
Anyway here's my four classes (again, it's not the best design or cleanest code, but I'm still learning)