document.write('<script src="https://cdn.jsdelivr.net/highlight.js/9.0.0/highlight.min.js" type="text/javascript"></script>');
document.write('<link media="all" type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/highlight.js/9.0.0/styles/default.min.css">');
document.write('<link media="all" type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/highlight.js/9.0.0/styles/tomorrow.min.css">');
document.write('<style>#pastee-VytbTV6RB1dyhjTT-content { margin-top: 0px !important; background-color: #f7f7f9; border: 1px solid #e1e1e8; white-space: pre-wrap; } #pastee-VytbTV6RB1dyhjTT-content > code { margin-top: 0px !important; }</style>');
document.write('Paste provided by <a href="https://paste.ee">Paste.ee</a> - <a href="https://paste.ee/p/2rzOx">View Original</a> - <a href="https://paste.ee/r/2rzOx/0">View Raw</a> - <a href="https://paste.ee/d/2rzOx/0">Download</a><br />');
document.write('<pre id="pastee-VytbTV6RB1dyhjTT-content"><code># Here we find all noncontradictory alliances for game http://www.kongregate.com/games/FibreTigre/you-are-the-us-secretary-of-state\n#The input section (We change things in this section to calculate something new)\n#Expressions are takes from file MiddleEastAlliancesTextFile.py\n\n#Possible prefer alliances with maximum number of allies? \n\nd={\n0:[&quot;Support Russia&quot;,False],\n1:[&quot;Support Assad&quot;,False],\n2:[&quot;Suppor syrian rebels&quot;,False],\n3:[&quot;Support Iran&quot;,False],\n4:[&quot;Support Muslim Brotherhood&quot;,False],\n5:[&quot;Support Hamas&quot;,False],\n6:[&quot;Support Turkey&quot;,False]}\n\n\nexpression=&quot;(d[2][1]!=d[1][1]) and IF(d[0][1],d[1][1] and d[3][1])and IF(d[1][1],d[3][1] and not(d[4][1]))and IF(d[2][1],d[4][1] and not(d[1][1]))and IF(d[3][1],not(d[2][1]) and d[1][1])and IF(d[4][1],d[5][1])and IF(d[5][1],d[4][1] and d[3][1])and IF(d[6][1],d[4][1] and not(d[1][1]))&quot;\n\n# The end of the Input section\n\ndef IF(a,c):\n    return (not(a) or c)\n\ndef booleanBruteforce(currentPosition=0):\n    for currentBoolean in (False,True):\n        d[currentPosition][1]=currentBoolean\n        if currentPosition==len(d)-1:\n            if eval(expression):\n                print(&quot;---------------------------------&quot;)\n                allies=0\n                for currentKey in d:\n                    if d[currentKey][1]==True:\n                        allies+=1\n                print(&quot;Allies:&quot;,allies)\n                for currentKey in d:\n                    print(d[currentKey][0]+&quot;:&quot;+str(d[currentKey][1]))\n        else:\n            booleanBruteforce(currentPosition+1)\n\nbooleanBruteforce()\n</code></pre>');

function initEmbeddedPaste_VytbTV6RB1dyhjTT() {
	hljs.highlightBlock(document.getElementById('pastee-VytbTV6RB1dyhjTT-content'));
}

addEventListener('DOMContentLoaded', initEmbeddedPaste_VytbTV6RB1dyhjTT, false);
addEventListener('load', initEmbeddedPaste_VytbTV6RB1dyhjTT, false);