Wednesday, November 13, 2013

The Poker Project [coder dojo]

I recently set the older kids in CoderDojo limerick a project to work on. I picked the poker project I did in first year of college because it covers a lot of the concepts of programming. I'd noticed a lot of the kids were coding without really understanding what they were doing so I decided to stear clear of OO for the time being and concentrate on the basics such as loops, conditions and arrays.

The challenge is create a one player, text based poker game that does the follow:

  • Create a deck of 52 cards
  • Deal a hand of 5 cards
  • Sort and display the hand in a user friendly manner
  • Allow the player to make a bet and then compare the hand to traditional poker hands (royal flush, straight flush, two pair etc) to see if the user has a good hand
Originally we were working in C++ but I told the kids they could work in what ever language they wanted. I've now got kids working in C++, java, php, javascript and phython. Mentoring simultaneously in 5 languages is an... interesting challenge to say the least

I've broken the tasks down into blocks to be covered during the weekly dojo sessions but we're moving at the pace of the group. The aim is to get the kids thinking of how to solve the problems rather than just tell them what to type. Every Tuesday I'm going to put up a review of the concepts covered and then on Friday I'm going to post the code I've put together. To get access to the code, the kids must email in their work. 

When the above steps are complete, each kid will be challenge to modify the code in a way of their choosing. Suggestions so far include adding additional (computer) players, a GUI or using ardunio to add hardware element. 

After that's complete we're going to move on to tackle Object Oriented Programming and all that goes with it.

No comments: