fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. #include <ctime>
  5. using namespace std;
  6.  
  7. // Dice class to roll the 6 dice at a time
  8. // for each player
  9. class Dice
  10. {
  11. private:
  12. int diceValue[6];
  13. bool rerollDiceValue[6];
  14. int rollDieCount;
  15. int countForReRoll;
  16. public:
  17.  
  18. // constructor
  19. Dice()
  20. {
  21. for(int i = 0; i < 6; i++)
  22. {
  23. diceValue[i] = 0;
  24. rerollDiceValue[i] = false;
  25. }
  26. countForReRoll = 0;
  27. rollDieCount = 0;
  28. }
  29.  
  30. // to roll the 6-dice
  31. void rollTheDice()
  32. {
  33. for(int i = 0; i < 6; i++)
  34. {
  35. diceValue[i] = (rand() % 6 + 1);
  36. if(diceValue[i] != 1 && diceValue[i] != 5)
  37. {
  38. rerollDiceValue[i] = true;
  39. }
  40. }
  41. }
  42.  
  43. // to re-roll the dice which are non-point dices
  44. void reRollTheDice()
  45. {
  46. for(int i = 0; i < 6; i++)
  47. {
  48. if(rerollDiceValue[i] == true)
  49. diceValue[i] = (rand() % 6 + 1);
  50. }
  51. }
  52.  
  53. // to reset the rerollDiceValues to false
  54. void resetReRoll()
  55. {
  56. for(int i = 0; i < 6; i++)
  57. {
  58. rerollDiceValue[i] = false;
  59. }
  60. }
  61.  
  62. // to get the scores of the 6-dices as per the rules provided
  63. int getRoundScore()
  64. {
  65. int one_Count = 0, two_Count = 0, three_Count = 0, four_Count = 0, five_Count = 0, six_Count = 0;
  66. int score = 0;
  67.  
  68. rollDieCount = 0;
  69. for(int i = 0; i < 6; i++)
  70. {
  71. switch(diceValue[i])
  72. {
  73. case 1:
  74. score += 100;
  75. one_Count++;
  76. break;
  77. case 2:
  78. two_Count++;
  79. rollDieCount++;
  80.  
  81. break;
  82. case 3:
  83. three_Count++;
  84. rollDieCount++;
  85.  
  86. break;
  87. case 4:
  88. four_Count++;
  89. rollDieCount++;
  90.  
  91. break;
  92. case 5:
  93. score += 50;
  94. five_Count++;
  95. break;
  96. case 6:
  97. six_Count++;
  98. rollDieCount++;
  99.  
  100. break;
  101. }
  102. }
  103. if(rollDieCount == 6)
  104. {
  105. cout << "Farkle!";
  106. score = 0;
  107. }
  108. else
  109. {
  110. if(one_Count >= 3)
  111. {
  112. score = (score - 300) + 1000;
  113. }
  114. else if(two_Count >= 3)
  115. {
  116. score += 200;
  117. for(int i = 0; i < 6; i++)
  118. {
  119. if(diceValue[i] == 2)
  120. {
  121. rerollDiceValue[i] = false;
  122. }
  123. }
  124. rollDieCount -= 3;
  125. }
  126. else if(three_Count >= 3)
  127. {
  128. score += 300;
  129. for(int i = 0; i < 6; i++)
  130. {
  131. if(diceValue[i] == 3)
  132. {
  133. rerollDiceValue[i] = false;
  134. }
  135. }
  136. rollDieCount -= 3;
  137. }
  138. else if(four_Count >= 3)
  139. {
  140. score += 400;
  141. for(int i = 0; i < 6; i++)
  142. {
  143. if(diceValue[i] == 4)
  144. {
  145. rerollDiceValue[i] = false;
  146. }
  147. }
  148. rollDieCount -= 3;
  149. }
  150. else if(five_Count >= 3)
  151. {
  152. score = (score - 150) + 500;
  153. }
  154. else if(six_Count >= 3)
  155. {
  156. score += 600;
  157. for(int i = 0; i < 6; i++)
  158. {
  159. if(diceValue[i] == 6)
  160. {
  161. rerollDiceValue[i] = false;
  162. }
  163. }
  164. rollDieCount -= 3;
  165. }
  166. }
  167. return score;
  168. }
  169.  
  170. // to display the 6-dice values
  171. void displayDice()
  172. {
  173. for(int i = 0; i < 6; i++)
  174. {
  175. cout << diceValue[i] << " ";
  176. }
  177. }
  178.  
  179. // to get the rollDieCount
  180. int getRollDieCount()
  181. {
  182. return rollDieCount;
  183. }
  184.  
  185. // to set the rollDieCount
  186. void setRollDieCount(int value)
  187. {
  188. rollDieCount = value;
  189. }
  190. };
  191.  
  192. // Player class to hold the each round score and over
  193. // all score
  194. class Player
  195. {
  196. private:
  197. string name;
  198. int score;
  199. int totalScore;
  200. public:
  201.  
  202. // constructor
  203. Player()
  204. {
  205. name = "XXXXXX";
  206. score = 0;
  207. totalScore = 0;
  208. }
  209.  
  210. // parameterized constructor
  211. Player(string name)
  212. {
  213. this->name = name;
  214. score = 0;
  215. totalScore = 0;
  216. }
  217.  
  218. // to set the name
  219. void setName(string name)
  220. {
  221. this->name = name;
  222. }
  223.  
  224. // to get the name
  225. string getName()
  226. {
  227. return this->name;
  228. }
  229.  
  230. // to add score to the total
  231. void addScore(int roundscore)
  232. {
  233. score = roundscore;
  234. totalScore += roundscore;
  235. }
  236.  
  237. // to set the score
  238. void setScore(int score)
  239. {
  240. this->score = score;
  241. }
  242.  
  243. // to retrieve the totalscore
  244. int getTotalScore()
  245. {
  246. return totalScore;
  247. }
  248.  
  249. // to retrieve the score of each round
  250. int getScore()
  251. {
  252. return score;
  253. }
  254. };
  255.  
  256.  
  257. // FarkleGame class which holds the each player's name,
  258. // each round game status and initializes the game and the winner
  259. class FarkleGame
  260. {
  261. private:
  262. Player *players;
  263. int countPlayers;
  264. Dice dice;
  265. public:
  266.  
  267. // parameterized constructor
  268. FarkleGame(int numPlayers)
  269. {
  270. players = new Player[numPlayers];
  271. countPlayers = numPlayers;
  272. }
  273.  
  274. // to read the names of the players
  275. void readNamesOfPlayers()
  276. {
  277. string name;
  278. for(int i = 0; i < countPlayers; i++)
  279. {
  280. cout << "Enter the name of player " << (i + 1) << ": ";
  281. cin >> name;
  282. players[i].setName(name);
  283. }
  284. }
  285.  
  286. // to roll the dice for each player until the player
  287. // scores 1000 or more points
  288. void playersToEnterGame()
  289. {
  290. int score = 0;
  291. for(int i = 0; i < countPlayers; i++)
  292. {
  293. score = 0;
  294. while(score < 1000)
  295. {
  296. dice.rollTheDice();
  297. dice.displayDice();
  298. score = dice.getRoundScore();
  299. cout << "\t Points Scored: " << score << endl;
  300. }
  301. players[i].addScore(score);
  302. cout << players[i].getName() << " enters the game!" << endl<<endl;
  303. }
  304. dice.setRollDieCount(0);
  305. cout << "All players entered the game. Let's begin the game!" << endl<<endl;
  306. }
  307.  
  308. // to check whether the game score of any player reaches 10000 or more
  309. // and to get the index of winner
  310. bool winsTheGame(int *index)
  311. {
  312. for(int i = 0; i < countPlayers; i++)
  313. {
  314. if(players[i].getTotalScore() >= 10000)
  315. {
  316. *index = i;
  317. return true;
  318. }
  319. }
  320. return false;
  321. }
  322.  
  323. // to play each round for a player
  324. void eachPlayerGame(int i)
  325. {
  326. char wouldLikeToReRoll;
  327. int score = 0;
  328. cout << players[i].getName() << " roll's the dice: " << endl;
  329. dice.rollTheDice();
  330. dice.displayDice();
  331. score = dice.getRoundScore();
  332. cout << "\t Points Scored: " << score << endl;
  333. players[i].setScore(score);
  334. if(dice.getRollDieCount() == 0)
  335. {
  336. cout << "Point-dice scoring! You have got a chance to play one more round again!" << endl;
  337. players[i].addScore(score);
  338. dice.reRollTheDice();
  339. dice.displayDice();
  340. score += dice.getRoundScore();
  341. cout << "\t Points Scored: " << score << endl << endl;
  342. players[i].setScore(score);
  343. }
  344. else if(dice.getRollDieCount() != 6)
  345. {
  346. cout << endl << "Would you like to reroll the " << dice.getRollDieCount()
  347. << " non-point dice? (Y/N): ";
  348. cin >> wouldLikeToReRoll;
  349. cout << endl;
  350. if(wouldLikeToReRoll == 'y' || wouldLikeToReRoll == 'Y')
  351. {
  352. dice.reRollTheDice();
  353. dice.displayDice();
  354. score = dice.getRoundScore();
  355. cout << "\t Points Scored: " << score << endl << endl;
  356. if(players[i].getScore() > score)
  357. score = players[i].getScore();
  358. players[i].setScore(score);
  359. }
  360. else if(wouldLikeToReRoll == 'n' || wouldLikeToReRoll == 'N')
  361. {
  362. cout << players[i].getName() << " turn is over..." << endl << endl;
  363. dice.setRollDieCount(0);
  364. }
  365. }
  366.  
  367. dice.resetReRoll();
  368. cout << players[i].getName() << " your score from that round: " << players[i].getScore() << endl;
  369. players[i].addScore(score);
  370.  
  371. cout << "Your total score after the round: " << players[i].getTotalScore() << endl << endl;
  372. cout << endl << "============================================"
  373. << "============================" << endl << endl;
  374. }
  375.  
  376. // to play the game for multiple players
  377. void playEachRound(int index)
  378. {
  379. for(int i = index; i < countPlayers; i++)
  380. {
  381. eachPlayerGame(i);
  382. }
  383. }
  384.  
  385. // to begin the game and display the winner strategy
  386. void playTheGame()
  387. {
  388. int index = 0;
  389. while(!winsTheGame(&index))
  390. {
  391. playEachRound(0);
  392. }
  393. int i = 0;
  394. int count = 0;
  395.  
  396. for(i = index + 1; i < countPlayers; i++)
  397. {
  398. eachPlayerGame(i);
  399. count++;
  400. }
  401. if(count != countPlayers - 1)
  402. {
  403. for(i = 0; i < index; i++)
  404. eachPlayerGame(i);
  405. }
  406.  
  407. int max = 0;
  408.  
  409. // logic to check for the winner
  410. for(int i = 0; i < countPlayers; i++)
  411. {
  412. if(players[i].getTotalScore()>max)
  413. {
  414. max = players[i].getTotalScore();
  415. index = i;
  416. }
  417. }
  418.  
  419. // display the winner
  420. cout << endl<< players[index].getName() << " wins the game!" << endl;
  421. }
  422. };
  423.  
  424. // to display the rules from the text file
  425. void displayRules()
  426. {
  427. string lineInFile;
  428. ifstream inputfile;
  429. inputfile.open("farkleRules.txt");
  430. while(getline(inputfile, lineInFile))
  431. {
  432. cout << lineInFile << '\n';
  433. }
  434. inputfile.close();
  435. }
  436.  
  437. // main function
  438. int main(string* players[])
  439. {
  440. srand(time(0));
  441. int numPlayers;
  442.  
  443. // display the rules
  444. displayRules();
  445. cout << endl << "*************************************************"
  446. << "******************************" << endl << endl;
  447. cout << endl << "\t\t===== Let us start the game! =====" << endl << endl;
  448.  
  449. // prompt the user for number of players are participating in the game
  450. cout << endl << endl << "Number of players would like to play the game? ";
  451. cin >> numPlayers;
  452. while(numPlayers<2)
  453. {
  454. cin.clear();
  455. cin.ignore();
  456. cout << "Please enter a whole number" << endl;
  457. cin >> numPlayers;
  458. }
  459.  
  460. // create an object for FarkleGame class
  461. FarkleGame fg(numPlayers);
  462.  
  463. // call the method readNamesOfPlayers() to read names of the players
  464. fg.readNamesOfPlayers();
  465.  
  466. // call the method playersToEnterGame() to make the each player score 1000 points
  467. fg.playersToEnterGame();
  468.  
  469. // call the method playTheGame() to start the game
  470. fg.playTheGame();
  471. system("PAUSE");
  472. return 0;
  473. }
Success #stdin #stdout #stderr 0s 4244KB
stdin
2 2 D M 2 2 
stdout
*******************************************************************************


		===== Let us start the game! =====



Number of players would like to play the game? Enter the name of player 1: Enter the name of player 2: 3   3   5   3   4   6   	 Points Scored: 350
6   1   4   2   3   2   	 Points Scored: 100
4   6   4   1   5   4   	 Points Scored: 550
3   2   3   3   4   1   	 Points Scored: 400
2   6   1   6   6   6   	 Points Scored: 700
6   6   2   4   6   5   	 Points Scored: 650
1   6   3   2   1   5   	 Points Scored: 250
3   4   2   4   5   1   	 Points Scored: 150
5   5   6   1   5   1   	 Points Scored: 700
6   4   4   6   3   3   Farkle!	 Points Scored: 0
5   6   6   4   3   5   	 Points Scored: 100
6   1   4   3   2   3   	 Points Scored: 100
5   2   6   1   3   2   	 Points Scored: 150
5   1   4   2   6   6   	 Points Scored: 150
2   5   4   5   2   4   	 Points Scored: 100
5   1   4   4   2   4   	 Points Scored: 550
6   2   5   2   4   4   	 Points Scored: 50
4   2   4   1   6   4   	 Points Scored: 500
1   2   3   4   3   2   	 Points Scored: 100
4   2   4   5   4   5   	 Points Scored: 500
2   2   3   5   3   5   	 Points Scored: 100
3   1   4   1   2   1   	 Points Scored: 1000
2 enters the game!

2   5   6   3   3   4   	 Points Scored: 50
1   3   5   3   1   6   	 Points Scored: 250
2   2   1   5   6   5   	 Points Scored: 200
1   1   4   2   6   5   	 Points Scored: 250
6   6   5   3   6   6   	 Points Scored: 650
1   5   2   4   2   4   	 Points Scored: 150
1   6   1   4   6   5   	 Points Scored: 250
1   1   6   1   3   3   	 Points Scored: 1000
D enters the game!

All players entered the game. Let's begin the game!

2 roll's the dice: 
3   3   1   5   4   6   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 1150


========================================================================

D roll's the dice: 
3   1   5   1   1   2   	 Points Scored: 1050

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 1050
Your total score after the round: 2050


========================================================================

2 roll's the dice: 
6   1   5   1   3   4   	 Points Scored: 250

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 250
Your total score after the round: 1400


========================================================================

D roll's the dice: 
2   1   3   2   4   2   	 Points Scored: 300

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 300
Your total score after the round: 2350


========================================================================

2 roll's the dice: 
6   4   6   3   3   2   Farkle!	 Points Scored: 0
2 your score from that round: 0
Your total score after the round: 1400


========================================================================

D roll's the dice: 
3   3   4   4   1   6   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 2450


========================================================================

2 roll's the dice: 
1   3   4   6   3   5   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 1550


========================================================================

D roll's the dice: 
5   6   3   1   4   5   	 Points Scored: 200

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 200
Your total score after the round: 2650


========================================================================

2 roll's the dice: 
4   6   6   4   1   1   	 Points Scored: 200

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 200
Your total score after the round: 1750


========================================================================

D roll's the dice: 
3   5   3   2   5   5   	 Points Scored: 500

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 500
Your total score after the round: 3150


========================================================================

2 roll's the dice: 
3   2   1   5   5   2   	 Points Scored: 200

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 200
Your total score after the round: 1950


========================================================================

D roll's the dice: 
4   5   2   1   2   5   	 Points Scored: 200

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 200
Your total score after the round: 3350


========================================================================

2 roll's the dice: 
3   5   4   6   5   6   	 Points Scored: 100

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 100
Your total score after the round: 2050


========================================================================

D roll's the dice: 
2   1   5   5   4   3   	 Points Scored: 200

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 200
Your total score after the round: 3550


========================================================================

2 roll's the dice: 
6   1   5   2   6   4   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 2200


========================================================================

D roll's the dice: 
4   3   3   4   1   5   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
D your score from that round: 150
Your total score after the round: 3700


========================================================================

2 roll's the dice: 
3   2   1   5   6   3   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 2350


========================================================================

D roll's the dice: 
1   3   5   2   6   1   	 Points Scored: 250

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 250
Your total score after the round: 3950


========================================================================

2 roll's the dice: 
1   5   1   3   4   3   	 Points Scored: 250

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 250
Your total score after the round: 2600


========================================================================

D roll's the dice: 
6   3   1   2   2   6   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 4050


========================================================================

2 roll's the dice: 
5   5   6   5   6   4   	 Points Scored: 500

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 500
Your total score after the round: 3100


========================================================================

D roll's the dice: 
3   1   5   4   3   3   	 Points Scored: 450

Would you like to reroll the 1 non-point dice? (Y/N): 
D your score from that round: 450
Your total score after the round: 4500


========================================================================

2 roll's the dice: 
4   3   5   6   2   2   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
2 your score from that round: 50
Your total score after the round: 3150


========================================================================

D roll's the dice: 
6   3   6   5   5   3   	 Points Scored: 100

Would you like to reroll the 4 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 4600


========================================================================

2 roll's the dice: 
5   2   3   3   4   2   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
2 your score from that round: 50
Your total score after the round: 3200


========================================================================

D roll's the dice: 
2   6   4   6   5   2   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 50
Your total score after the round: 4650


========================================================================

2 roll's the dice: 
3   5   2   6   6   2   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
2 your score from that round: 50
Your total score after the round: 3250


========================================================================

D roll's the dice: 
2   1   2   4   6   3   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 4750


========================================================================

2 roll's the dice: 
5   6   5   2   2   2   	 Points Scored: 300

Would you like to reroll the 1 non-point dice? (Y/N): 
2 your score from that round: 300
Your total score after the round: 3550


========================================================================

D roll's the dice: 
3   6   3   5   2   4   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 50
Your total score after the round: 4800


========================================================================

2 roll's the dice: 
5   1   4   2   6   6   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 3700


========================================================================

D roll's the dice: 
1   1   2   2   6   2   	 Points Scored: 400

Would you like to reroll the 1 non-point dice? (Y/N): 
D your score from that round: 400
Your total score after the round: 5200


========================================================================

2 roll's the dice: 
1   1   2   2   2   2   	 Points Scored: 400

Would you like to reroll the 1 non-point dice? (Y/N): 
2 your score from that round: 400
Your total score after the round: 4100


========================================================================

D roll's the dice: 
5   6   5   3   5   6   	 Points Scored: 500

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 500
Your total score after the round: 5700


========================================================================

2 roll's the dice: 
2   1   3   5   4   4   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 4250


========================================================================

D roll's the dice: 
2   2   2   3   1   6   	 Points Scored: 300

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 300
Your total score after the round: 6000


========================================================================

2 roll's the dice: 
2   2   6   2   1   5   	 Points Scored: 350

Would you like to reroll the 1 non-point dice? (Y/N): 
2 your score from that round: 350
Your total score after the round: 4600


========================================================================

D roll's the dice: 
3   2   3   2   1   2   	 Points Scored: 300

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 300
Your total score after the round: 6300


========================================================================

2 roll's the dice: 
3   5   1   5   6   3   	 Points Scored: 200

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 200
Your total score after the round: 4800


========================================================================

D roll's the dice: 
2   1   4   4   5   1   	 Points Scored: 250

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 250
Your total score after the round: 6550


========================================================================

2 roll's the dice: 
5   5   6   1   1   4   	 Points Scored: 300

Would you like to reroll the 2 non-point dice? (Y/N): 
2 your score from that round: 300
Your total score after the round: 5100


========================================================================

D roll's the dice: 
6   1   5   5   2   4   	 Points Scored: 200

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 200
Your total score after the round: 6750


========================================================================

2 roll's the dice: 
1   2   3   1   3   3   	 Points Scored: 500

Would you like to reroll the 1 non-point dice? (Y/N): 
2 your score from that round: 500
Your total score after the round: 5600


========================================================================

D roll's the dice: 
2   4   2   6   6   1   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 6850


========================================================================

2 roll's the dice: 
2   2   1   3   5   4   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 150
Your total score after the round: 5750


========================================================================

D roll's the dice: 
1   4   2   6   4   6   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 6950


========================================================================

2 roll's the dice: 
4   1   4   6   3   3   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
2 your score from that round: 100
Your total score after the round: 5850


========================================================================

D roll's the dice: 
1   3   4   3   1   5   	 Points Scored: 250

Would you like to reroll the 3 non-point dice? (Y/N): 
D your score from that round: 250
Your total score after the round: 7200


========================================================================

2 roll's the dice: 
6   6   6   5   5   5   	 Points Scored: 500

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 500
Your total score after the round: 6350


========================================================================

D roll's the dice: 
5   4   4   3   1   3   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
D your score from that round: 150
Your total score after the round: 7350


========================================================================

2 roll's the dice: 
6   1   4   5   5   5   	 Points Scored: 600

Would you like to reroll the 2 non-point dice? (Y/N): 
2 your score from that round: 600
Your total score after the round: 6950


========================================================================

D roll's the dice: 
3   6   5   6   3   1   	 Points Scored: 150

Would you like to reroll the 4 non-point dice? (Y/N): 
D your score from that round: 150
Your total score after the round: 7500


========================================================================

2 roll's the dice: 
1   4   1   2   4   1   	 Points Scored: 1000

Would you like to reroll the 3 non-point dice? (Y/N): 
2 your score from that round: 1000
Your total score after the round: 7950


========================================================================

D roll's the dice: 
6   3   6   3   5   2   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 50
Your total score after the round: 7550


========================================================================

2 roll's the dice: 
6   3   3   3   4   3   Farkle!	 Points Scored: 0
2 your score from that round: 0
Your total score after the round: 7950


========================================================================

D roll's the dice: 
5   1   2   6   6   6   	 Points Scored: 750

Would you like to reroll the 1 non-point dice? (Y/N): 
D your score from that round: 750
Your total score after the round: 8300


========================================================================

2 roll's the dice: 
4   6   3   6   3   5   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
2 your score from that round: 50
Your total score after the round: 8000


========================================================================

D roll's the dice: 
4   3   6   4   5   4   	 Points Scored: 450

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 450
Your total score after the round: 8750


========================================================================

2 roll's the dice: 
2   2   6   5   5   3   	 Points Scored: 100

Would you like to reroll the 4 non-point dice? (Y/N): 
2 your score from that round: 100
Your total score after the round: 8100


========================================================================

D roll's the dice: 
4   4   3   1   4   6   	 Points Scored: 500

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 500
Your total score after the round: 9250


========================================================================

2 roll's the dice: 
3   3   1   2   6   4   	 Points Scored: 100

Would you like to reroll the 5 non-point dice? (Y/N): 
2 your score from that round: 100
Your total score after the round: 8200


========================================================================

D roll's the dice: 
5   2   3   1   1   5   	 Points Scored: 300

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 300
Your total score after the round: 9550


========================================================================

2 roll's the dice: 
6   3   6   3   6   4   Farkle!	 Points Scored: 0
2 your score from that round: 0
Your total score after the round: 8200


========================================================================

D roll's the dice: 
6   6   3   4   2   5   	 Points Scored: 50

Would you like to reroll the 5 non-point dice? (Y/N): 
D your score from that round: 50
Your total score after the round: 9600


========================================================================

2 roll's the dice: 
6   6   6   2   6   4   Farkle!	 Points Scored: 0
2 your score from that round: 0
Your total score after the round: 8200


========================================================================

D roll's the dice: 
2   6   4   6   6   3   Farkle!	 Points Scored: 0
D your score from that round: 0
Your total score after the round: 9600


========================================================================

2 roll's the dice: 
3   4   4   3   5   3   	 Points Scored: 350

Would you like to reroll the 2 non-point dice? (Y/N): 
2 your score from that round: 350
Your total score after the round: 8550


========================================================================

D roll's the dice: 
5   2   5   4   4   2   	 Points Scored: 100

Would you like to reroll the 4 non-point dice? (Y/N): 
D your score from that round: 100
Your total score after the round: 9700


========================================================================

2 roll's the dice: 
5   2   1   2   5   1   	 Points Scored: 300

Would you like to reroll the 2 non-point dice? (Y/N): 
2 your score from that round: 300
Your total score after the round: 8850


========================================================================

D roll's the dice: 
6   4   6   6   5   3   	 Points Scored: 650

Would you like to reroll the 2 non-point dice? (Y/N): 
D your score from that round: 650
Your total score after the round: 10350


========================================================================

2 roll's the dice: 
3   6   6   6   3   5   	 Points Scored: 650

Would you like to reroll the 2 non-point dice? (Y/N): 
2 your score from that round: 650
Your total score after the round: 9500


========================================================================


D wins the game!
stderr
sh: 1: PAUSE: not found