PDA

View Full Version : Programming Competition?



Korbman
10-20-2008, 02:34 PM
I've been programming in C++ for about a year and a half or so, and I've found that I like what the language can do for me. I also know that there are many talented programmers on this forum.

So, I figured...Why not see what other people can do? I was thinking about holding a C++ competition. I would make up a task, post it up, and the winner of the competition would be rewarded. For simple programs, the reward would be around 500k - 1M. Medium difficulty programs could be around 1M - 3M. Hard programs could be from 3M - 7M. And really difficult programs could be around 7M - 12M.(h)

If you're wondering, the way the winner would be rewarded is pretty simple. Just let me know who you are in RS, and then I'll take the money and we can go out to wildy (or PVP) and you just kill me. Pretty straight forward. :p

Oh, and if you want to do well with this competition (if it happens) here's a bit of C++ info you should know about:
+ Pointers (*, **, this, ->, etc.)
+ Arrays (standard and multidimensional)
+ Functions (void and returning)
+ Classes (including base classes, and derived classes, as well as constructors/destructors)
+ Templates
+ Overloading (operators and functions)
+ Header files/CPP files
+ Reading and Writing to files (text files and binary files)
+ Recursion

Many of that information above will be included in the more difficult programs, not necessarily the easy ones. So if you understand everything from above, and you decide to participate in the competition, then you find yourself with quite a bit of money in a short amount of time :)

So, tell me what you think! If there are enough people interested, and enough people like the idea, then I'll start deciding what I want people to create for the first competition! :D

Korbman
10-27-2008, 01:47 AM
Well, I see that I've got a small group of people that may have an interest in the competition. So I figure I'll throw out a program that everyone can start working on.

C++ competition, Program #1: Blackjack card game!

LEVEL: Hard :eek:

PRIZE: 6M :D

DETAILS: Try your hand out at making a blackjack card game simulator. The code must be based around object-orientation. The game should include a dealer (of course) and at least one player (which would be the user). Standard blackjack rules apply, and there doesn't need to be any actual gambling (ie. no money). The program should keep a tally on the wins and loses of player. The program should use everything from the THINGS TO KNOW section below. Oh, and use comments.
You can use either DevC++ or Visual Studio 2005 to code in. :)

THINGS TO KNOW: pointers, arrays, by reference, new and delete (when dealing with pointers), classes (base and derived), constructors/destructors, functions, multiple headers/CPPs. ;)

DUE DATE: November 3rd, 2008

To get you guys started, I thought I would provide some framework functions I created.
Here they are:
class Card { <-- Used for determining the card and it's value
string cardName; to either the player of dealer.

};

class NumberCard : public Card { <-- Used for determining if the card is a number card

};

class FaceCard : public Card { <-- Used for determining if the card is a face card

};

class AceCard : public Card { <-- Used for determining if the card is an ace.

};

class Deck { <-- Holds the information about the deck, does the dealing to both the player and dealer, shuffles the cards, and checks to see if the deck is empty
Card deck[52];
void Shuffle();
bool isEmpty();
};

class Player { <-- Holds the cards for the player

Card *hand;

};

class Dealer : class Player { <-- Holds the cards of the dealer

};

class Table { <-- Where the cards are dealt
Dealer dealer;
Player player;

};


class Game { <-- Sets up the table and the game
Table table;
void Play();
};

REMEMBER: the framework above is just a template, and the names can be changed. A perfect program, which is one that includes everything stated above and from the THINGS TO KNOW section, would not only earn the reward, but may get a bonus as well. The due date is when this first competition closes, so you can always turn in the program for judgement before that time period.

THE WINNER: I will determine the winner based a few things: Does it work? How long did it take this person to create the program? Did they use the anything from the THINGS TO KNOW section? Is the program commented? Is the program efficiently coded?

I think I've explained everything pretty clearly and thoroughly, but if anyone has any questions feel free to ask me either through a reply here or a PM.:)

GOOD LUCK AND HAPPY CODING! :D

R0b0t1
10-29-2008, 05:41 PM
Why are pointers hard? They're in even the most basic C/C++ programs. Also, templates are more of a hack (IE, they are ugly), and really aren't used that much on their own, but only from the library...

Korbman
10-30-2008, 06:15 PM
Why are pointers hard? They're in even the most basic C/C++ programs. Also, templates are more of a hack (IE, they are ugly), and really aren't used that much on their own, but only from the library...

I'm not saying that pointers are hard, it's just when a program gets really complicated pointers get a little more confusing (at least from my experience, but maybe that's just me). As for the templates, I pretty much agree with that statement. I've only used them in rare circumstances, but when I did use them they made life a little easier. ;)

boberman
10-30-2008, 06:39 PM
What's your target compiler? I pretty much have it done, but it would be nice if I could know what I am trying to compile it on.

Korbman
10-31-2008, 02:11 PM
What's your target compiler? I pretty much have it done, but it would be nice if I could know what I am trying to compile it on.

Well, I'm very familiar with Visual Studio so I suppose that's my target, but I have used DevC++ in the past...and I can get that again. What did you use to write the program?

boberman
10-31-2008, 03:13 PM
Well, I'm very familiar with Visual Studio so I suppose that's my target, but I have used DevC++ in the past...and I can get that again. What did you use to write the program?

g++ & vim (Dev-c++ uses g++ as well)

Korbman
11-04-2008, 02:22 PM
Well, unfortunately....this first competition is now closed since it is past November 3rd.:duh: I suppose that, even if you have code that doesn't yet work or isn't fully completed, I'll still take a look at it and judge it to the best of my abilities. The person with the most amount of the program completed will get some of the prize (not all of it since the program isn't done).:p
Does that seem pretty fair?
Just attach a zip file (or whatever archive) of your source if you want to submit. :)

Light
03-21-2009, 07:35 AM
Any chance you plan on reviving this? I'd be interested in competing if you care to create new challenges.

Tniffoc
03-21-2009, 03:48 PM
Can I do it in Java? :)

Buckleyindahouse
03-22-2009, 01:46 AM
Can I do it in Java? :)
Haha, Im in your sig!
Woot.

Griff
03-24-2009, 02:41 AM
Haha, Im in your sig!
Woot.

Good post!

Buckleyindahouse
03-24-2009, 03:01 AM
Good post!
Thank you, had to liven up the forums.

Phoenix13nl
04-16-2009, 01:52 AM
I think a competition would be fun, but I don't know C++, I want C# :P