for x = 1:3
    if sum(MainGame(x,:))==3|sum(MainGame(:,x))==3|(MainGame(1)+MainGame(5)+MainGame(9))==3
        CurrentWinner = 'O';
        disp('O''s are the winner! Game over.')
        TTTStartGamePBCB()
    end
    if sum(MainGame(x,:))==-3|sum(MainGame(:,x))==-3|(MainGame(1)+MainGame(5)+MainGame(9))==-3
        CurrentWinner = 'X';
        disp('O''s are the winner! Game over.')
        TTTStartGamePBCB()
    end
end