Blackjack, nearly completed!
Okay, so as most of you might know I've been working on a blackjack game and I'm very close to completion of my first project.
I'd like anyone to reply to me if they want the source code or an executable for my blackjack game. I'm not going to bother posting any source code here except for my main.cpp file. The rest of the code is split up between nearly 30 different files. If you want to take a look at it (for constructive criticism purposes, please do take a look at it!) I can email you the source.
The only issues I need to resolve include preventing the game from crashing when I tell it to exit, and adding the split hand option in case we get dealt two identical cards at game start. Double down works, betting works, everything works like it should for the most part.
Here is the main.cpp file!
Code:
// Main.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <time.h>
#include "Game.h"
#include "State_Manager.h"
#include "Menu_State.h"
int _tmain(int argc, _TCHAR* argv[])
{
// random seed for the shuffle function
srand ( unsigned(time(NULL)) );
// pointer to game engine
Card_Game * game = new Card_Game();
// pointer to the state manager
State_Manager state_manager;
// initialize the engine
game->init();
// load the intro state & pass game engine to the state manager
state_manager.change_state( Menu_State::instance(), game );
// main loop
while ( state_manager.running() )
{
state_manager.update(game); // do updates
state_manager.print(game); // print text
state_manager.handle_events(game); // get input and handle events
}
// cleanup the engine
game->cleanup();
return 0;
}
suprise! it's not a single function, its not an enourmous jumbled mess. it's juuuuust right :D
If you're curious reply here and pm me!
EDIT:
I just figured out how to get my project attached, just rename it to .rar when you dl it!
Attachment removed by moderator.