+ Reply to Thread
Results 1 to 7 of 7

Thread: Accurate Gaydar

  1. #1
    Must've been rats Sakonosolo's Avatar
    Join Date
    Jun 2006
    Location
    Homey Airport

    Default Accurate Gaydar

    I have finally perfected the perfect Gaydar! It's written in Java, though I tried to write it in Python but it didn't work . Anyway, have fun .

    Code:
    import cs1.Keyboard;
    
    public class Gaydar
    {
        String[] vowels={"a","e","i","o","u"};
        String[] consonants={"b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"};
        int name1Value=0;
        int name2Value=0;
        int value;
        
        public String test(String first,String last)
        {
            for(int i=0; i<first.length(); i++)
            {
                for(int j=0; j<vowels.length; j++)
                {
                    if(first.substring(i,i+1).equalsIgnoreCase(vowels[j])){name1Value++;}
                    else{}
                    
                }
            }
            for(int i=0; i<first.length(); i++)
            {
                for(int j=0; j<consonants.length; j++)
                {
                    if(first.substring(i,i+1).equalsIgnoreCase(consonants[j])){name1Value+=2;}
                    else{}
                    
                }
            }
            
            for(int i=0; i<last.length(); i++)
            {
                for(int j=0; j<vowels.length; j++)
                {
                    if(last.substring(i,i+1).equalsIgnoreCase(vowels[j])){name2Value++;}
                    else{}
                    
                }
            }
            for(int i=0; i<last.length(); i++)
            {
                for(int j=0; j<consonants.length; j++)
                {
                    if(last.substring(i,i+1).equalsIgnoreCase(consonants[j])){name2Value+=2;}
                    else{}
                    
                }
            }
            
            if(name1Value>name2Value){value=name1Value-name2Value;}
            else if(name2Value>name1Value){value=name2Value-name1Value;}
            else{value=1;}
            
            if(value%2==0){return "Straight";}
            else{return "Gay";}
        }
        
        public static void main(String[]args)
        {
            for(int k=1; k>0; k++)
            {
                Gaydar gaydar=new Gaydar();
                String firstName;
                String lastName;
            
                System.out.print("Enter first name: ");
                firstName=Keyboard.readString();
                System.out.print("Enter last name: ");
                lastName=Keyboard.readString();
                System.out.println();
                System.out.println(gaydar.test(firstName,lastName)+"\n");
            }
        }
    }
    Last edited by Sakonosolo; December 13th, 2009 at 07:42 PM.

  2. #2
    Banned Rank: Failed Mutineer
    Join Date
    Feb 2009
    Location
    Ponyville

    Default Re: Accurate Gaydar

    Uh.........Sorry, but I have no idea how this works...

  3. #3
    Must've been rats Sakonosolo's Avatar
    Join Date
    Jun 2006
    Location
    Homey Airport

    Default Re: Accurate Gaydar

    Lol, okay. I'll upload a .jar file somewhere. Which file hosting service do you think is the best?

  4. #4
    Banned Rank: Failed Mutineer
    Join Date
    Feb 2009
    Location
    Ponyville

    Default Re: Accurate Gaydar

    Sorry, I still don't understand. :/ Can just explain how it works?

  5. #5
    Part Time Lurker OrangeNinjasSucks's Avatar
    Join Date
    Jun 2009
    Location
    A Sinister Lab

    Default Re: Accurate Gaydar

    Well you see it works like Bakura's gaydar except it isn't a millieum ring....Sorry I have no clue either.....

    3DS FRIEND CODE: 0344-9293-6833

  6. #6
    Must've been rats Sakonosolo's Avatar
    Join Date
    Jun 2006
    Location
    Homey Airport

    Default Re: Accurate Gaydar

    I've been trying to turn it into a .jar file but it's not working right. Copy the text and paste it into Wordpad and save it as Gaydar.java. Then find your Java folder, should be something like My Computer/C:/Program Files/Java or something like that. Now open up the CMD and navigate to where you saved the file. Type "set path=%path%;*whatever the path to the bin folder inside the Java folder*". Then type "javac Gaydar.java" then "java Gaydar". If I confused you then get off your computer .

    I'm basically joking about it being accurate. All it does is
    - Add up the letters in your first and last name, vowels are worth 1 and consonants are worth 2
    - Subtracts the smallest one from the largest one
    - If that number is even then it says straight and if odd it says gay

    It does work remarkably well though. Freddie Mercury, Naruto Uzumaki, Sasuke Uchiha, and Elton John all come out gay . Though Ellen Degeneres is straight .
    Last edited by Sakonosolo; December 17th, 2009 at 07:42 PM.

  7. #7

    Default Re: Accurate Gaydar

    Interesting, though I couldn't get the java to work my number came out as 4, which is correct XD

    And then I did it for my gay friends and they all came out gay XD Nifty tool.

    . tumblr
    . mfc .
    . ask for FB or AIM/Skype .
    . psn & nintendo id squeesax . 3DS FC: 3797-6626-6957 .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts