Created
September 16, 2018 22:14
-
-
Save Jorger/cb9f08b220e0c66fabdd5a8a1f48accc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let finalElements = 0; | |
for (let connected of connectedPipes) { | |
if ( | |
actualWorld[1][connected][2] !== 1 && | |
actualWorld[1][connected][2] !== 2 | |
) { | |
//Se establece el color... | |
actualWorld[1][connected][4] = initialColor; | |
} else { | |
if (actualWorld[1][connected][2] === 2) { | |
//Es un elemento final de los pipes que se han conectado... | |
if (actualWorld[1][connected][4] === initialColor) { | |
finalElements++; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment