Okay, so, super super busy of late, going to have to significantly cut down my post-output to like, 2 a week on Tue/Thu. Just a heads up. So this'll be the last post this week.
Here, I'll give you a link to the files needed, and you can run the file for yourself!
Showing posts with label java game code. Show all posts
Showing posts with label java game code. Show all posts
Thursday, 12 January 2012
Tuesday, 10 January 2012
Java: Texas Hold Em - Debugging (2)
Woo, change to the titling, because I kept losing track of what number we were on, and I can't count past 40 anyway. Okay, so we looked at the folding, and that seems to work. We should still see if we can stop the New Hand message appearing twice, so let's do that, then tomorrow we can move on to testing another action.
Monday, 9 January 2012
Java: Texas Hold Em (36) - Debugging the client
Okay, folks, going to keep it short. Today, I'll show you some screens of how the client works inside the IDE and point out some stuff that might need fixing. This'll not only give you the opportunity to thing about how it's going on, but what I might have missed so you can suggest a fix of your own!
Here we go:
Here we go:
Friday, 6 January 2012
Java: Texas Hold Em (35)
Almost there, folks! Today we get to the point where the functionality only needs to be debugged, and thus is pretty much done! So next week is debugging, and if we have time, depending on how riddled with errors the code is, get to the GUI.
Let's stop talking about getting to tat point now, and actually get there!
Let's stop talking about getting to tat point now, and actually get there!
Thursday, 5 January 2012
Java: Texas Hold Em (34)
Ah, for those unaware, debugging is the process of finding/identifying errors (bugs) and removing them from some program. Doing this is mostly uninteresting, and in the case of the ConsoleClient, just involves me running the entire class and seeing what it does, then trying to find out why it does that.
I was going to document the debugging, but only after we were done with the class, since errors crop up in the form of methods we've not covered, and it'd get confusing :)
For now, though, lets get to finishing the ConsoleClient. Looking at the Client interface, there's 7 or so more methods to go! Here we go:
I was going to document the debugging, but only after we were done with the class, since errors crop up in the form of methods we've not covered, and it'd get confusing :)
For now, though, lets get to finishing the ConsoleClient. Looking at the Client interface, there's 7 or so more methods to go! Here we go:
Wednesday, 4 January 2012
Java: Texas Hold Em (33) - The Console Client
Hullo again! I meant to make this post in advance to get up here so I could have today off, but then I didn't, so I'm stuck here :(
Today we start on our ConsoleClient, which should be the final piece to our functionality. Maybe, I honestly don't quite get either of the clients, so there will probably be a load of debugging to do. Probably some which I won't be able to do. But that's enough optimism, let's get down to the client!
Today we start on our ConsoleClient, which should be the final piece to our functionality. Maybe, I honestly don't quite get either of the clients, so there will probably be a load of debugging to do. Probably some which I won't be able to do. But that's enough optimism, let's get down to the client!
Monday, 2 January 2012
Java: Texas Hold Em (32)
Hullo! Finishing off the table class today so tomorrow we can go through a tutorial of the Map class. After that, we'll be messing with the ConsoleClient to complete our functionality, then put aside a few days to test it all out so we can be confident that we're set to move onto the GUI and so on and so forth!
Friday, 30 December 2011
Java: Texas Hold Em (31)
Okay, today I'll try leaving in the commentary to the code, leaving my posting text to stuff like this, that's not directly code related!
Today we'll be looking at the method that handles showdowns in the game, enjoy!
Today we'll be looking at the method that handles showdowns in the game, enjoy!
Thursday, 29 December 2011
Java: Texas Hold Em (30)
Okay, in the receding phase of my migraine, which means I can stick around longer, but I'm still not at full operating capacity! Still, I figure we can get through the huge method, which will actually take a little bit OVER the 2 screenshots I wanted to limit my posts to, but only by like, 2-3 lines.
The reason the method is so large is that it's responsible for the entire round of betting, so there's a big chunk of stuff and a switch statement to boot. Also, switch statements make use of "break;" so that inflates the length of the code a bit.
Here it is:
The reason the method is so large is that it's responsible for the entire round of betting, so there's a big chunk of stuff and a switch statement to boot. Also, switch statements make use of "break;" so that inflates the length of the code a bit.
Here it is:
Wednesday, 28 December 2011
Java: Texas Hold Em (29)
Well, got a migraine today, so sorry, folks, can't give you the big one I promised. Instead, I'll cover it whenever this blasted thing is gone, and cover the method that returns a player's allowed actions tonight.
Here it is, short as possible:
Here it is, short as possible:
Tuesday, 27 December 2011
Java: Texas Hold Em (28)
Yar, hope everyone had themselves a good weekend, I sure did! If I recall right, we left off at the table dealing out the community cards, which means today we'll be covering a method to reset the hand, and another to switch players for turn rotation and such. Let's get to it, no more partying for you!
Thursday, 22 December 2011
Java: Texas Hold Em (27)
Okay, back for a second post, it's late and I'm busy though, so deal with it being short! Four short methods totaling about 30 lines of code! We'll be covering a method to deal with each of the blinds and 2 for dealing out cards:
Java: Texas Hold Em (26)
Okay, post 1 of 2 for today! I'll take a break after this to type up the second, since I had this prepared for yesterday! This one contains a few administrative methods, the main game loop, a way to add players and a way to start the game over. The second screenshot is a huge method to take care of actually playing an individual hand. Here goes:
Tuesday, 20 December 2011
Java: Texas Hold Em (25)
Okay, so it turns out the ConsoleClient is pretty confusing, and requires the Table anyway, so we'll be doing the Table! Yay! Ooh, there's a problem though. You probably don't remember (I didn't), but when the Hand class was created, I left out the constructor that takes an ArrayList or something as a parameter. We need to go back and fix that so our table runs smoother!
Monday, 19 December 2011
Java: Texas Hold Em (24)
What's up, guys? Today we're back to the card game! We can probably finish it up today, but be aware that the actual act method is long, although it is just a switch statement, so not necessarily complex. I'll leave it to last so we can get the easy stuff out of the way, first.
Friday, 16 December 2011
Java: Texas Hold Em (23)
Hey hey, time for another post. Last time we left off at getCash for the Player class, after a number of get methods and some other crap. Luckily, there's a buttload more of get methods to go through, so we still have some easy stuff around. Just a heads up though, on Monday we'll go through a larger method that uses the switch-statement.
This week is my final make-up week where I make weekend posts, so tomorrow, as promised, I'll cover string formatting in more detail, and on Sunday I'll actually refresh us all on the switch statement, just in case you need it!
This week is my final make-up week where I make weekend posts, so tomorrow, as promised, I'll cover string formatting in more detail, and on Sunday I'll actually refresh us all on the switch statement, just in case you need it!
Thursday, 15 December 2011
Java: Texas Hold Em (22)
Hi, people! Going to just make this as brief as I can today, don`t feel up to much. The Player class has 177 lines when I got rid of all the (rightfully present) comments, so you can keep track of how far we have to go before the end.
Let`s get right into some methods now, with a few get...() methods and reset...() methods (among others) as you might expect would be needed in a round-based game:
Let`s get right into some methods now, with a few get...() methods and reset...() methods (among others) as you might expect would be needed in a round-based game:
Wednesday, 14 December 2011
Java: Texas Hold Em (21)
Alrighty, I looked over the ConsoleClient class, and uh, I was lost, so let's do the Player class instead! It's a little long, about 300 lines before I do anything to it, like make it ugly and remove vast amounts of comments, but we'll get through it.
After that, we can just do the Table class, leaving ConsoleClient to the end of the functional code, at which point we have bots and GUIs to do. See, this is why people rarely code from scratch, and just modify other peoples' code, it takes way too long otherwise. But I suppose in the heart of learning...
After that, we can just do the Table class, leaving ConsoleClient to the end of the functional code, at which point we have bots and GUIs to do. See, this is why people rarely code from scratch, and just modify other peoples' code, it takes way too long otherwise. But I suppose in the heart of learning...
Tuesday, 13 December 2011
Java: Texas Hold Em (20)
Hey now, the Client isn't empty, only everything that it does is! Wait, does that make it sadder? Who cares, it probably deserves it. That's right folks, it's time to get the Client done, and therefore officially the start of the "What the fuck am I doing, and why?" part of the project! At least we're not at the "What am I doing, and how am I supposed to work out how?" part?
Here we go!
Here we go!
Monday, 12 December 2011
Java: Texas Hold Em (19)
Hey hey, post as promised, late as promised! I'm so awesome! Today we're continuing with our HandValue class, and we'll be done with it tonight! I do hope after all this time wasted this project doesn't end up being a flop :P
After this, we could move on to the Table, but that is what Players sit at, so we should do those. However, it looks like the Player class needs a Client interface to work with. Being an interface, and not a class, if you remember, this means that Client will be a collection of related methods, but empty.
We`re starting to get into territory that I don`t quite get, so...good luck? We'll see how this pans out!
After this, we could move on to the Table, but that is what Players sit at, so we should do those. However, it looks like the Player class needs a Client interface to work with. Being an interface, and not a class, if you remember, this means that Client will be a collection of related methods, but empty.
We`re starting to get into territory that I don`t quite get, so...good luck? We'll see how this pans out!
Subscribe to:
Posts (Atom)