programming projects

Discussion in 'iOS Programming' started by blue-lion, Jan 1, 2011.

  1. blue-lion macrumors member

    Jan 26, 2010
    hello, i am desperately trying to find a project to improve my knowledge of objective c.

    i recently did a great little project about 'mutating breeding rabbits'. i know it sounds silly, but i learned loads and would like to do something along those lines again involving lists,objects,inheritance,etc..

    Every exercise i find is either too simple or a proper app project(not quite ready for that yet!).

    any ideas??
  2. JustSomeDude macrumors regular

    Apr 10, 2010
    You could do something with cards and card games. Classes for cards, decks, hands. Methods for shuffling decks. Methods for evaluating hands - recognize a flush or straight, for example. Evaluate strength of hands. Maybe a method for generating all combinations of hands given a certain set of cards (could be useful testing other methods). You could handle different types of cards, also. I believe some types of deck have more than 13 cards per suit.
  3. blue-lion thread starter macrumors member

    Jan 26, 2010

    Thanks for the suggestion... yes this is the kind of thing i was thinking of.. I assume you've tried this ,or perhaps it was just something off the top of your head?.
    Like my mutating rabbits project it will probably rely quite heavily some kind of random number generator .. at least at the 'shuffling the deck' phase?
  4. JustSomeDude, Jan 2, 2011
    Last edited by a moderator: Jan 2, 2011

    JustSomeDude macrumors regular

    Apr 10, 2010
    It's been many years, but, yes, I did do something like this before. Yes, you'll need to use a random number generator shuffling the deck. Shuffling the deck is actually not that hard, but 90% of people do it wrong (I've seen professional programmers butcher this), so if you have problems with the algorithm just google it or ask and I can post a simple algorithm.

    Just another thought. This stuff would lend it itself nicely to other bigger, more advanced projects if you do a good job with it. For example, after getting a card class done, you can start with a simple console based card game - maybe blackjack or texas hold'em. With the poker games, you could start with just human opponents, but eventually add computer opponents. You could make it a full graphical game at some point. In either the console version or the graphical you add some network code to be able to play an opponent remotely. You can just keep going in various directions, juts adding different features at each point.
  5. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset

Share This Page