Professional Documents
Culture Documents
Peg Game
Peg Game
int main()
{
// Define variables and constants here
const int MAX_PEGS = 20;
const int MAX_OBJECTS = 10;
int num_pegs; //number of pegs
int *pegs; //objects in pegs
int num_players = 2; //maximum number of players
// Algorithm:
// Display statistics
display_statistics(pegs, num_pegs);
// WHILE some peg is NOT empty DO
int peg = 1; //used in loop: counter for peg
int current_player = 1; //indicates the current player
int peg_to_modify; //peg being modified
int objects_to_remove; //objects to be removed from specified peg
return 0;
}