HU Poker Dice Game Program
Description
I attached a file with the code that I have to write, and the template for this code
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// Add all occurences of goal value
int CheckSingles(vector<int>& diceValues, int goal) {
/* Complete the function and update the return statement */
return -1;
}
// Check for three of a kind (score = 30)
int CheckThreeOfKind(vector<int>& diceValues) {
/* Complete the function and update the return statement */
return -1;
}
// Check for four of a kind (score = 40)
int CheckFourOfKind(vector<int>& diceValues) {
/* Complete the function and update the return statement */
return -1;
}
// Check for five of a kind (score = 50)
int CheckFiveOfKind(vector<int>& diceValues) {
/* Complete the function and update the return statement */
return -1;
}
// Check for full house (score = 35)
int CheckFullHouse(vector<int>& diceValues) {
/* Complete the function and update the return statement */
return -1;
}
// Check for straight (score = 45)
int CheckStraight(vector<int>& diceValues) {
/* Complete the function and update the return statement */
return -1;
}
// Find high score
int FindHighScore(vector<int>& diceValues) {
/* Complete the function and update the return statement */
return -1;
}
int main() {
vector<int> diceValues(5);
int highScore = 0;
// Fill array with five values from input
for(int i = 0; i < 5; ++i) {
cin >> diceValues.at(i);
}
// Place values in ascending order
sort(diceValues.begin(), diceValues.end());
// Find high score and output
highScore = FindHighScore(diceValues);
cout << “High score: ” << highScore << endl;
return 0;
}
write a program to calculate the score from a throw of five dice.
Unformatted Attachment Preview
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."