Friday, May 25, 2012

Friendship Algorithm in Java

UPDATE: Source code fixed and updated below.


UPDATE: Currently trying to nail down a problem with the loopcounter at the end of the code. I will update the source here as soon as it is fixed.

For Geek Pride Day (May 25)/ 42 Day (25+05+12), a super double geek-out! I took the Friendship Algorithm from the second season of The Big Bang Theory and spent about an hour converting it into Java code in Eclipse. The result is an extremely convoluted but functional bag of Java loops that accepts input of answers to the original flow chart's questions and goes down the proper path for the answers. Full source code below.