Guessing Game - Online Code


Briefing: In this game, the user and the computer choose each one an option between stone, scissors and paper. Stone wins over scissors, scissors over paper and paper over stone: Stone -> Scissors -> Paper -> Stone... The first who wins WINSCORE times is the competition winner.

Source Code

#include <iostream.h>
#include <stdlib.h>
#include <time.h>

#define WINSCORE 3

// Function PickRandomOption
// * Returns a random character between 's', 'x', and 'p'
char PickRandomOption (void)
	char opti
... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.


No comment yet. Be the first to post a comment.