Danny AA · April 7, 2015 Hello,I need to build a domino game.it's a game like the real domino user vs computer.I need to make few class.1 stone class2 pile classs3 player class4 game classDominoes is a game consisting of 28 pieces called stones. Rectangular game pieces from some of them middle lineTwo squares, each with marked points. Commonly used stones with zero to six points.Each player gets 7 stones. The first player is the player who has a domino with numbers 6-6.If no one has 6-6 the user starts and he can put any stone he wants.The second takes out one of his stone and putm at the table.tha stone is One of the squares is the same one from the edges of the square of stone that is on the table and place it near.for example 3-6, 6-1, 1-5, 5-3, 3-0......and more.when there is no suitable stone the player take from the pile more stone untill he get one that can fit.The game is over one of the two following situations:1. When one of the players do not remain stone, an actor is declared the winner.2. When there were no stones in the fund and no player has what lay. In this case the player wins the totalPoints on the stones left in him is the smallest.plllsssssssssssssssssssssss i need help.

## Replies

 Danny AA · April 8, 2015 I don't want anybody will do my homework.I just need some tips if u can help that's all.I have probelm at the pile class.I'm trying to make a func that will print all the stones opened.and another func that will print all the stones closed.tnx Franz Schmidt · April 7, 2015 sorry man but i don't think anybody here will do your homework but looks like you have allready some knowledge and if you have any specific questions you can ask anytime.So do you have any problems with your code, or are you stuck with a specific problem?? Danny AA · April 7, 2015 And this is the pile class....#ifndef PILE_H#define PILE_H#include #include "Stone.h"class Pile{private: Stone* domino; public: Pile(); ~Pile(); void PrintOpen() const; void PrintClose() const; void shuffle(); Stone returnIndex();};#endif;======================================================================== Danny AA · April 7, 2015 #ifndef STONE_H#define STONE_H#include #include using namespace std;typedef enum { Left = 1, Right = 2 }Flip;class Stone{private: int num1, num2; public: Stone(); Flip flipStone(int, int); Stone(int, int); ~Stone(){ }; void setNum1(int); void setNum2(int); bool equal(Flip, Flip); int getNum1()const { return this->num1; } int getNum2()const { return this->num2; } void PrintClose()const; void PrintOpen()const;};#endif=================================================================#include "Stone.h"Stone::Stone(){ this->num1 = 0, this->num2 = 0;}Stone::Stone(int n1, int n2) :num1(n1), num2(n2){}void Stone::setNum1(int a) { num1 = a; }void Stone::setNum2(int b) { num2 = b; }void Stone:printClose() const{ cout << "The stone is closed [][]" << endl;}void Stone:printOpen()const{ cout << "The stone is opened" << endl;}bool Stone::equal(Flip a, Flip b){ if (a == b) return true; return false;}Flip Stone::flipStone(int s1, int s2){ if (s1 == Right) s1 = Left; if (s2 == Left) s2 = Right;}
• 1

## C++

129,836 followers