Good vs. Evil

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
80 Also kinda surprised (I assume) he's not dead. He's certainly a good Darwin Award candidate, ignoring the fact that he already has established himself in the genepool.
 
86 The handy UNIX utility that I use to produce things like this:

The human brain is a wonderful thing. It starts working the moment
you are born, and never stops until you stand up to speak in public.
-- Sir George Jessel
 
84/83
Code:
 get x
           if x = >50
                  print x - 1
           if x = <50
                  print x + 1
           if x = 50
                  print 49
           if x = 99
                  print 100
           if x = 1
                  print 0
           if x = 100
                   print 50
           if x = 0
                   print 50
This code would be pretty good for this game right?
 
84/83
Code:
 get x
           if x = >50
                  print x - 1
           if x = <50
                  print x + 1
           if x = 50
                  print 49
           if x = 99
                  print 100
           if x = 1
                  print 0
           if x = 100
                   print 50
           if x = 0
                   print 50
This code would be pretty good for this game right?
unless the language works different then I suspect it will the if x = 99 and later will never be executed.
This comes because the x = >50 and x = < 50 will also be true in those cases and will be found earlier.
If you want them to be executed they need to be checked first and have the x = > 50 and x = < 50 the lasts checks.

edit:83
 
unless the language works different then I suspect it will the if x = 99 and later will never be executed.
This comes because the x = >50 and x = < 50 will also be true in those cases and will be found earlier.
If you want them to be executed they need to be checked first and have the x = > 50 and x = < 50 the lasts checks.

edit:83

Oh. Didn't know that.