#include #include "Game.h" #include "LinkedGame.h" using namespace std; /** * A constructor, where the parameters N and K are interpetted, as * described in the documentation for the class Game, and which are * assumed to be positive integers. */ LinkedGame::LinkedGame(int N, int K) { } /** * Returns the number of players who currently remaining in the game. */ int LinkedGame::size() const { return -1; // fix this as needed } /** * Plays a single round, eliminating one player. This method can be * called repeatedly to simulate several consecutive rounds of the * game. * * If there is only one player in the game, throws a * GameOverException, rather than removing the last player. * * The return value is The ID of the removed player. */ int LinkedGame::playRound() throw(GameOverException) { return -1; // fix this as needed } /** * Completes the entire game, from the current state. * (i.e. equivalent to calling playRound repeatedly until size is * one). * * The return value should be the ID of the sole surviving player. */ int LinkedGame::completeGame() { return -1; // fix this as needed } /** * This method toggles the 'verbose' setting. The return value * indicates the new setting. * * The default behavior should be with verbose set to false, in * which case no output is to be generated by the other methods. * * If verbose is set to true, subsequent steps of the game should * produce a message, printed to the standard output stream, to * document the play of the game. * * This method may be called more than once, if setting changes are * desired while a game is in progress. */ bool LinkedGame::toggleVerbose() { return false; // fix this as needed } /** * Destructor */ LinkedGame::~LinkedGame() { // do any cleanup which is necessary. }