Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dice Game
#1
My first game programmed with C++
No tutorial was followed, just all my knowledge from 17 online lessons Big Grin

People that do know C++, feedback on the source and what I can do better to improve
my programming skills would be appreciated.

source code: [spoiler][code]#include
#include


void RollDice(int iPlayerGuess);
void GiveGold(int iAmount);
void TakeGold(int iAmount);
void PlayerWin(int iDie1, int iDie2);
int iPlayerGold;

void main() {
int iPlayerGuess;
std::cout iPlayerGuess;
RollDice(iPlayerGuess);
}

void RollDice(int iPlayerGuess) {
time_t t;
time(&t);
srand(t);
int iDie1;
int iDie2;

if (iPlayerGuess < 0 || iPlayerGuess > 12){
main();
}

std::cout
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)