Simple match game on Java.