FaltuTech.Club : Fane of Advanced Logical Thriving Utopian Technical Club

A Better Snakes and Ladders (Saanp-Sidhi) Code in C++(C Plus Plus(cpp))


#include 
#include 
#include 
#include 
class SaanpSidhi                                  {
private: char Player[20];
	 int  Position;
	 void  Check_Nega_Plus();     // Checks if current position have Snake or ladder
public:	 SaanpSidhi()                             {      // initializes the Player position
	 Position=0;
	 }

	void roll();        // to roll the dice
	void Get_Player()                             {                // to get the player name
	 cout > Player;

	}
	void Player_Name()                            {               // display player name
	cout > r;
	}
	while(r!='r');
	r='x';

 do                                               {
 num=random(6)+1;
 cout =100)                     {
p1.Player_Name();
cout