Created
September 7, 2012 03:58
-
-
Save chrismedrdz/3662956 to your computer and use it in GitHub Desktop.
Llenado de Carros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = ( ( Rand.nextInt(10000) % 16) + 1); | |
CarrilA = CarrilA + a; | |
if (CarrilA < 0) { CarrilA = 0; } | |
b = ( ( Rand.nextInt(10000) % 16) + 1); | |
CarrilB = CarrilB + b; | |
if (CarrilB < 0) { CarrilB = 0; } | |
c = ( ( Rand.nextInt(10000) % 8) + 1); | |
CarrilC = CarrilC + c; | |
if (CarrilC < 0) { CarrilC = 0; } | |
d = ( ( Rand.nextInt(10000) % 8) + 1); | |
CarrilD = CarrilD + d; | |
if (CarrilD < 0) { CarrilD = 0; } | |
if (aux = true) { | |
if (SemAB = true) { | |
CarrilA=CarrilA-3; | |
CarrilB=CarrilB-2; | |
if (CarrilA < 0) { CarrilA = 0; } | |
if (CarrilB < 0) { CarrilB = 0; } | |
CarrilC=CarrilC+5; | |
CarrilD=CarrilD+5; | |
} else { | |
CarrilC=CarrilC-2; | |
CarrilD=CarrilD-2; | |
if (CarrilC < 0) { CarrilC = 0; } | |
if (CarrilD < 0) { CarrilD = 0; } | |
CarrilA=CarrilA+3; | |
CarrilB=CarrilB+3; | |
} | |
} | |
Sistema CtrlSem = new Sistema(); | |
CtrlSem.start(); | |
CtrlSem.setCarros(CarrilA,CarrilB,CarrilC,CarrilD); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment