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
import math | |
def minimax(resultList): | |
results = resultList[len(resultList) - 1] | |
if len(results) == 1: | |
return results[0], resultList | |
depth = math.log2(len(results)) | |
newResults = [] | |
for i in range(0, len(results), 2): | |
a, b = results[i], results[i + 1] |
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
// Copy-Paste this code into the browser console | |
// | |
// Execute with: | |
// | |
// autoReload() | |
// | |
// Or with a custom config: | |
// | |
// autoReload({ reloadInterval: 20 }) |
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
const colors = { | |
green: { | |
100: '#00ff00', | |
}, | |
} | |
Object.entries(colors).map(([color, shades]) => | |
Object.entries(shades).map(([shade, colorCode]) => renderShade(color, shade, colorCode)) | |
) |