%   TTTNewGameCB.m
%   Description: This script will confirm a new game if a game is already
%   running. Then it will ask which player will go first. Then it will run
%   the game until the game is over. It will calculate and display results.
%   Inputs:
%   Outputs:
%   Team DATT "All DATT and den sum."
%   11/17/05

%StartNewGame = true means a new game must happen because current game is in process
%StartNewGame = false means a new game can happen without any problems

if StartNewGame == false
    TTTStartGamePBCB
else
    NewGameConfirmation = menu({'This will start a new game.','This will be recorded as a loss.','Are you sure you want to start a new game?'}, 'New Game', 'Cancel');
    if NewGameConfirmation == 1
        Losses = get(findobj('tag','LossesNumST'),'string');
        Losses = str2num(Losses) + 1;
        set(findobj('tag','LossesNumST'),'string',num2str(Losses))
        
        StartNewGame = false;
        TTTStartGamePBCB
    end
end



