• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Best options for my card shuffling applet  RSS feed

 
Greenhorn
Posts: 6
IntelliJ IDE Java Mac Netbeans IDE Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assessment:

Making a card deck with Card shuffling...
Downloaded already a cards pack from http://nifty.stanford.edu/2004/EstellCardGame/cards20.zip
How should I add the cards?

My code for now...
 
Marshal
Posts: 64494
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have already complained about applets, and you read that bit yourself.

Don't try any GUIs or anything like that until you have got the application working without a GUI. Do whatever you need to do with the cards in a console application first, then you can add a GUI.

I am not sure how useful that code you downloaded is going to be. You can find card symbols in Unicde here and here. Because some of those Unicode values are > 0xffff, you may have to do this sort of thing:-This is 1f0aa: 🂪. Unfortunately it doesn't seem to give you hearts/diamonds in red.
Find out about enumerated types from the Java™ Tutorials and also the Java® Language Specification (=JLS).  Yes, read the JLS. If Sun are going to publicise useful information in the JLS, how can anybody complain if you use that information?
Maybe you can use a Map to map the different cards to their pictures from your download. Maybe that should be done at a later stage in your application development.
 
Victor Nizeyimana
Greenhorn
Posts: 6
IntelliJ IDE Java Mac Netbeans IDE Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I have already complained about applets, and you read that bit yourself.

Don't try any GUIs or anything like that until you have got the application working without a GUI. Do whatever you need to do with the cards in a console application first, then you can add a GUI.

I am not sure how useful that code you downloaded is going to be. You can find card symbols in Unicde here and here. Because some of those Unicode values are > 0xffff, you may have to do this sort of thing:-This is 1f0aa: 🂪. Unfortunately it doesn't seem to give you hearts/diamonds in red.
Find out about enumerated types from the Java™ Tutorials and also the Java® Language Specification (=JLS).  Yes, read the JLS. If Sun are going to publicise useful information in the JLS, how can anybody complain if you use that information?
Maybe you can use a Map to map the different cards to their pictures from your download. Maybe that should be done at a later stage in your application development.



That is awesome cards in Unicode! Only the assignment is still an applet... -.- Really don't like it...
 
Campbell Ritchie
Marshal
Posts: 64494
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Victor Nizeyimana wrote:. . . . Only the assignment is still an applet... -.- Really don't like it...

Unfortunately you will have to use the applet if you want good marks. You have already read my opinions on another thread. Upgrade to Java11 and see how many warnings you get from the compiler.
Java11 is an LTS version an Java8 is nearing the end of its “lifetime”.
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!