@@ -0,0 +1,1409 @@
+// Created by /u/jorgegil96 on Reddit%0A// Challenge #213 %5BEasy%5D Cellular Automata: Rule 90%0A// https://www.reddit.com/r/dailyprogrammer/comments/3jz8tt/20150907_challenge_213_easy_cellular_automata/%0A%0Apublic class CARule90 %7B%0A%09public static void states(String input, StringBuilder sb) %7B%0A%09%09int before, after;%0A%09%09for (int i = 0; i %3C input.length(); i++) %7B%0A%09%09%09before = 0;%0A%09%09%09after = 0;%0A%09%09%09if (i == 0) %7B%0A%09%09%09%09after = Character.getNumericValue(input.charAt(i + 1));%0A%09%09%09%7D%0A%09%09%09else if (i == input.length() - 1) %7B%0A%09%09%09%09before = Character.getNumericValue(input.charAt(i - 1));%0A%09%09%09%7D%0A%09%09%09else %7B%0A%09%09%09%09before = Character.getNumericValue(input.charAt(i - 1));%0A%09%09%09%09after = Character.getNumericValue(input.charAt(i + 1));%0A%09%09%09%7D%0A%09%09%09if ((before + after) %25 2 == 0) %7B%0A%09%09%09%09System.out.print(%22 %22);%0A%09%09%09%09sb.setCharAt(i, '0');%0A%09%09%09%7D%0A%09%09%09else%7B%0A%09%09%09%09System.out.print(%22X%22);%0A%09%09%09%09sb.setCharAt(i, '1');%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09String input = %2200000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000%22;%0A%09%09StringBuilder sb = new StringBuilder(input);%0A%0A%09%09int n = 25;%0A%0A%09%09for (int i = 0; i %3C input.length(); i++)%0A%09%09%09if (input.charAt(i) == '0')%0A%09%09%09%09System.out.print(' ');%0A%09%09%09else%0A%09%09%09%09System.out.print('X');%0A%0A%09%09System.out.println(%22%22);%0A%0A%09%09for (int i = 0; i %3C n; i++)%7B%0A%09%09%09states(sb.toString(), sb);%0A%09%09%09if (!sb.toString().contains(%221%22))%7B%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%09System.out.println(%22%22);%0A%09%09%7D%0A%0A%09%7D%0A%7D

Add Challenge #213[Easy]