function prize = Game2(probabilityThreshold)
%
%   prize = Game2(probabilityThreshold)
%
% EXPLANATION: This function tells you how much you have won by drawing univariate
% random numbers until a number falls below the threshold
%
% INPUT:
%  - threshold = probability of getting 0 CHF
%
% OUTPUT:
% - prize = prize won at the game
%
% EXAMPLE: prize = Game2(0.75);
%
% Axel Kind, axel.kind@unibas.ch, 16/02/2009
%
prize = 0;
while rand > probabilityThreshold
    prize = prize + 100;
end
disp(['You won ' num2str(prize) ' CHF !'])
