Created
October 9, 2016 22:28
-
-
Save jrhii/92cf0be520f1bc25425c620c8649917c to your computer and use it in GitHub Desktop.
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
for (const colorArray of arrayOfColors) { | |
fs.writeFileSync(`colorArray_${colorArray[0].colorKey}.json`, JSON.stringify(colorArray, null, 2)); | |
console.log(`owner ${colorArray[0].ownerID} is not null: ${colorArray[0].ownerId !== null}`); | |
if (colorArray.every(property => property.ownerId === colorArray[0].ownerId) && colorArray[0].ownerId !== null) { | |
for (const property of colorArray) { | |
property.isMonopoly = true; | |
} | |
} else { | |
for (const property of colorArray) { | |
property.isMonopoly = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment