The Artima Developer Community
Sponsored Link

Java Buzz Forum
Too Little Time To Shuffle

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mike Shoemaker

Posts: 158
Nickname: mikeshoe
Registered: Sep, 2004

Mike Shoemaker is senior Java developer using Ruby
Too Little Time To Shuffle Posted: Nov 29, 2005 11:32 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Mike Shoemaker.
Original Post: Too Little Time To Shuffle
Feed Title: Unruly Rambling (java category)
Feed URL: http://www.shoesobjects.com/blog/feed.xml?flavor=rss20&category=java
Feed Description: My thoughts on software, technology, and life in general
Latest Java Buzz Posts
Latest Java Buzz Posts by Mike Shoemaker
Latest Posts From Unruly Rambling (java category)

Advertisement

As Christmas grows near, my Organizational Behavior course is coming to an end. I have enjoyed the class tremendously but I haven't had the opportunity to tinker around with new technology or complete any fun programming projects. I did say fun so work doesn't count. Not having this needed outlet puts a serious damper on my energy level as well as professional motivation. Now that things are starting to slow down a bit, what will I do?

For the past several months I've had poker on my mind and have considered writing a game in Java. My friends and I play a card game call Beret ad nauseum. Sometimes we play 20+ rounds in an evening which equates to 4 hours or so. Beret is a trick based card game similar to spades(I've never played spades but I've heard people compare the two). A typical Beret hand is played like this. The dealer deals 5 cards to each player. After dealing, the dealer is allowed to flip up one of his cards to determine the trump suite. This card is visible to all players. At this point players decide if they are in or out. They call this out one by one moving clockwise around the table. A player can say in, out, or check. Once a single player is in, the check option is no longer available. Players that drop are out for the duration of this particular game which could be many hands. Players that remain in are allowed to draw up to five of their cards by discarding a like number. Once the draw is complete, the player to the left of the dealer starts the game by leading a card. The next player must throw a card of the same suite if he has one, otherwise he can "throw off" another suit or "trump" the played suite. The highest card of the led suite wins the trick. If someone trumps the led suite, the trump card beats all cards in any other suite. Any player not winning a single trick must match the pot. Any player winning three tricks wins the pot. If no one gets 3 tricks to win the game another game is dealt and lather, rinse, and repeat cycle continues. It's an addicting game that is a lot of fun to play.

My first attempt will be a command line version of the game. Not sure of the chances of actually completing it, but I would really like to. With a little luck and inspiration, maybe I'll be able to recruit someone to work on a rudimentary user interface down the road. At any rate, I better search for my The Art of Computer Programming books by Donald Kunth to brush up on a shuffle algorithm. If I find any typos I promise to share the $2.56 finder fee.

Read: Too Little Time To Shuffle

Topic: Intel Contributes To Apache Harmony Previous Topic   Next Topic Topic: CodeSnipers interview and Keith Casey's blog

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use