Android Open Source - droidgol Rules






From Project

Back to project page droidgol.

License

The source code is released under:

MIT License

If you think the Android project droidgol listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.rubyspa.droidgol;
/* w w w .ja v  a2  s . c  o m*/
public class Rules {
    public static boolean apply(final int neighbors, final boolean selfAlive) {
        switch (neighbors) {
            case 3:
                return true;
            case 2:
                if (selfAlive) return true;
                else return false;
        }
        return false;
    }
}




Java Source Code List

org.rubyspa.droidgol.GameActivity.java
org.rubyspa.droidgol.GamePrinter.java
org.rubyspa.droidgol.Game.java
org.rubyspa.droidgol.Rules.java