⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coupfromiterator.java

📁 利用JAVA编译的国际象棋中各棋子的步法。
💻 JAVA
字号:
/* * (Copyleft) coucou747 * Code sous licence GPL, * pour toute degradation de votre honneur, * je ne saurais en aucun cas etre tennu responsable *  * Si l'une des proprietes suivante vennait a etre verifiee : *  -Si vous avez des idees d'ameliorations possibles, *  -Si vous avez developpe des ameliorations *  -Si mon projet vous plait *  -Si mon code vous plait *  -Si vous vous servez de mon code *  -Si vous aimez les chips *  -Si vous avez trouve des bugs *  -Si vous avez fixe des bugs (c'est gentil :) ) *  -Si vous avez fait un projet base sur celui-ci *  -Si vous voullez me faire des bisous * faites le moi savoir *  -par mail a l'adresse coucou747@wanadoo.fr *  -par irc sur uni-irc.net salon #programmation *  -par msn a l'adresse coucou747@hotmail.com *  * Remerciements a mon ex-petite amie, * c'est probablement grace a elle que j'ai trouve le temps de coder ca... */package echec;/** * @brief class CoupFromIterator * @date 18 janv. 2008, 15:27:34 * @author max */public class CoupFromIterator implements java.util.Iterator{    public CoupFromIterator(Position start, Chessboard c){        this.start=start;        pi=new PositionIterator();        chessboard=c;        end=start;        while (pi.hasNext() && !chessboard.CanPlay(start, end)){            end=pi.next();        }    }    public void remove(){    }    public Position next(){        Position P=end;        end=pi.next();        while (pi.hasNext() && !chessboard.CanPlay(start, end)){            end=pi.next();        }        return P;    }    public boolean hasNext(){        return pi.hasNext();    }    private Position start, end;    private PositionIterator pi;    private Chessboard chessboard;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -