### Open processing

I am trying to create a graph demonstrating a capital dependent parrondo paradox - http://parrondoparadox.blogspot.co.uk/2011/02/mathematical-background-of-parrondos.html

I am coding in www.openprocessing.org.

My code is

 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 // define variables int Capital = 0; int T = 0; int lambda = 0.5; float p = 0.495; float p1 = 0.095; float p2 = 0.745; float R1,R2; int M=3; //set up canvas size(480,480); background(255,255,255); //draw zero axis stroke(200, 200, 200); line(t,height/2-Capital,t+1,height/2-Capital); //stroke(0,0,0); while (T<100) { R1 = random(0,1); T = T+1; if (R1 < lambda) // Game A { if ( R1 < lambda * p ) Capital = Capital+1; else Capital = Capital-1; } R2 = random(0,1); else { if ( Capital%M ==0 ) //play coin one of game B { if (R2 < p1) Capital = Capital+1; else Capital = Capital-1; } else // play coin two of game B { if (R2

This is the first time I have either tried to create graphics on c++, or used open processing.

I believe the errors are in my use of the line and stroke functions. Could anyone either explain these, or direct me to my error?

This should produce a graph where the capital decreases on the yaxis as time T increases on the x axis.