#Artemis Fowl

<!-- language: lang-java -->

    package Humans;
    
    public class ArtemisFowl extends Human {
        public String takeSides(String history) {
            int good = 0, evil = 0;
            for(int i = 0; i < history.length(); i++)   {
                switch(history.charAt(i))   {
                    case '0': evil++; break;
                    case '1': good++; break;
                }
            }
            if(good % 5 == 0){
               return "good";
            } else if (evil % 5 == 0){
               return "evil";
            } else {
               if(good > evil){
                  return "good";
               } else if(evil > good){
                  return "evil";
               } else {
                  return Math.random() >= 0.5 ? "good" : "evil";
               }
            }
        }
    }

In Book 7, *The Atlantis Complex*, [Artemis Fowl](http://en.wikipedia.org/wiki/Artemis_Fowl_(series)) contracted a psychological disease (called Atlantis complex) that forced him to do everything in multiples of 5 (speaking, actions, etc). When he couldn't do it in some multiple of 5, he panicked. I do basically that: see if good or evil (intentional bias) is divisible by 5, if neither is, then I panic & see which was greater & run with that or panic even further & randomly choose.