diff --git a/WireChem.py b/WireChem.py index 3183785..8e20006 100644 --- a/WireChem.py +++ b/WireChem.py @@ -124,7 +124,7 @@ def initgrid(): allcout=[0,0,0] sizex=sizey=1 seestat=thecout=world=over=play=cycle=rayon=temp=cout=decx=decy=unroll=nrj=0 - debug=1 + debug=0 tech=selected=level=-1 statedvar=[stat[0],stat[1],stat[2],stat[3],stat[4],stat[5],stat[6],stat[7],stat[8],nrj,temp,rayon,current[7],current[8],current[9],current[10],current[11],current[12]] if len(stat_var)==0: @@ -147,10 +147,10 @@ def resize(): allsizex=2*win.width/3 else: allsizex=win.width - if sizex/float(sizey)0: - txt_cout.x=posx+addx+44 txt_cout.color=(180, 180, 180,255) else: txt_cout.color=(255, 0, 0,255) @@ -1024,7 +1024,7 @@ def reallystop(): dat['run']['value']='stop' play=0 clock.unschedule(calculate) - current=worlds[world][level]['current'] + current=copy.deepcopy(worlds[world][level]['current']) cycle=worlds[world][level]['cycle'] temp=worlds[world][level]['temp'] nrj=worlds[world][level]['nrj'] @@ -1204,8 +1204,10 @@ def negative(x): def invert(x): if ispositive(x): return negative(x) - else: + elif isnegative(x): return positive(x) + else: + return x def isbig(x): return (x & int("0xF000",16))==int("0x2000",16)