Examples of GoEyeList


Examples of com.barrybecker4.game.twoplayer.go.board.elements.eye.GoEyeList

     */
    private void updateVitalEyesForStringNeighbors(IGoEye eye) {

        for (IGoString str : eyeStringNbrMap.get(eye)) {
            // only add the eye if every unoccupied position in the eye is adjacent to the string
            GoEyeList vitalEyes;
            if (stringEyeNbrMap.containsKey(str)) {
                vitalEyes = stringEyeNbrMap.get(str);
            }
            else {
                vitalEyes = new GoEyeList();
                stringEyeNbrMap.put(str, vitalEyes);
            }

            if (allUnocupiedAdjacentToString(eye, str)) {
                eye.setUnconditionallyAlive(true);
                vitalEyes.add(eye);
            }
        }
    }
View Full Code Here

Examples of com.barrybecker4.game.twoplayer.go.board.elements.eye.GoEyeList

     * @return the number of unconditionally alive adjacent eyes.
     */
    private int findNumLivingAdjacentEyes(IGoString str) {
        int numLivingAdjacentEyes = 0;

        GoEyeList vitalEyeNbrs = stringEyeNbrMap.get(str);
        if (vitalEyeNbrs != null)  {
            for (IGoEye eye : vitalEyeNbrs) {
                if (eye.isUnconditionallyAlive()) {
                    numLivingAdjacentEyes++;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.