if someone can help me on this via aim or what not
or just someone that's good at java,
i'll happily give money as a tutoring fee.
please PM me! thank you.





| Blogs > Dark_Luster |
|
Dark_Luster
Korea (South)438 Posts
if someone can help me on this via aim or what not or just someone that's good at java, i'll happily give money as a tutoring fee. please PM me! thank you. ![]() ![]() ![]() ![]() ![]() | ||
|
micronesia
United States24734 Posts
Are you planning on a full gui? | ||
|
Mastermind
Canada7096 Posts
On May 27 2009 08:21 micronesia wrote: What is swing? Are you planning on a full gui? lol, swing is a library in Java for making GUIs. | ||
|
Dark_Luster
Korea (South)438 Posts
instead of using objectdraw or what not. please someone, help! | ||
|
Archaic
United States4024 Posts
I'll say start with an array of every single card value, being 2S, 2C, 2H, 2D, 3S, etc. etc. Then, get an image for each card, or simply create a container field to just hold the text value. (int)(Math.random()*52) to get a random card for dealing, and have each one have a value. i.e. switch(getActionListener.getText().charAt(0)){ case A: int value 11; break; case 2: int value = 2; break; case 3: int value = 3; break; ...... case 9: int value = 9; break; Default: int value =10; } if(value==11 && total+value>21) value=1; total+=value; This probably isn't the whole method, but it might help you get started... EDIT: You don't actually need the suits, at least not in blackjack. Second, you'd have to create a filter so there are no repeats. | ||
|
Dark_Luster
Korea (South)438 Posts
archaic, would you know how to make this whole blackjack game byyourself? | ||
|
King K. Rool
Canada4408 Posts
Here's some additions to what Archaic said: I used suits since you can name your card image files to be 1_heart.jpg or whatever, and be able to get/create the correct image simply by what part of the array you're at (or 2-d array, depending on whatever clever way you want to do the array). Modular arithmetic and constants should make this pretty simple. Also, instead of a filter you can use 2-3 collections for deck, discarded, and on table (or w/e smart way of implementing this you choose) and simply move objects around. I'd use integers, since you really only will ever need to have 5-6 card objects at max. edit: Showing images are simple enough, you can extend JPanel or use JButton with ImageIcons I believe (or some sort of Image object, I forget). Are you a beginner to swing? | ||
|
Dark_Luster
Korea (South)438 Posts
use own images in the applet. =o=;;; will someone just help me out via AIM or something? i just have a couple of questions. | ||
|
GHOSTCLAW
United States17042 Posts
| ||
|
EsX_Raptor
United States2802 Posts
java is an oop language and that's the way it should be done. | ||
|
King K. Rool
Canada4408 Posts
| ||
|
R3condite
Korea (South)1541 Posts
On May 27 2009 09:44 Dark_Luster wrote: i don't exactly know how to use images for each card. archaic, would you know how to make this whole blackjack game byyourself? u need the picture files... also is it juts the GUI u r having trouble w/ or the nonGUI version as well? | ||
|
Dark_Luster
Korea (South)438 Posts
right now as a rough draft, the cards in my hand are shown as just a box with (number/suit) how can i replace these with the actual pictures of the cards? | ||
|
h3r1n6
Iceland2039 Posts
![]() It's been some time since I did that, from what I recall is that Swing has some class for Logos/Pictures, but you can also use a JButton and replace it with a picture. This way you automatically have a way to listen for clicks on that card. | ||
| ||
StarCraft 2 mouzHeroMarine StarCraft: Brood WarSteadfastSC IndyStarCraft White-Ra UpATreeSC ProTech117 Railgan MindelVK ROOTCatZ Dota 2 Counter-Strike Heroes of the Storm Other Games FrodaN1322 fl0m758 Beastyqt582 Mlord517 ceh9442 KnowMe194 ArmadaUGS154 C9.Mang092 Mew2King77 Trikslyr55 QueenE50 shahzam7 OptimusSC21 Organizations
StarCraft 2 • Reevou StarCraft: Brood War• Adnapsc2 • Dystopia_ • Kozan • sooper7s • AfreecaTV YouTube • Migwel • LaughNgamezSOOP • intothetv • IndyKCrew Dota 2 League of Legends Other Games |
|
OSC
Replay Cast
OSC
LAN Event
Korean StarCraft League
CranKy Ducklings
LAN Event
IPSL
dxtr13 vs OldBoy
Napoleon vs Doodle
BSL 21
Gosudark vs Kyrie
Gypsy vs Sterling
UltrA vs Radley
Dandy vs Ptak
Replay Cast
[ Show More ] Sparkling Tuna Cup
WardiTV Korean Royale
LAN Event
IPSL
JDConan vs WIZARD
WolFix vs Cross
BSL 21
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
Wardi Open
WardiTV Korean Royale
Replay Cast
Kung Fu Cup
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
The PondCast
RSL Revival
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
WardiTV Korean Royale
|
|
|