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

📄 badbrain.java

📁 一个java的俄罗斯方块实现
💻 JAVA
字号:
package cs111.tetris.brain;import cs111.tetris.data.Board;/** * A joke implementation based on LameBrain -- plays very badly. * <p> * However, badly as it plays, it illustrates how it is possible to implement a new * Brain easily by simply extending LameBrain and overriding the <code>rateBoard</code> * method. */public class BadBrain extends LameBrain {	/**	 * An implementation that is even worse than LameBrain's.	 * Whatever LameBrain thinks is good is bad and vice versa.	 * So with this brain, the AI will tend to play the worst 	 * possible move instead of the best.	 */	public double rateBoard(Board board) {		double score = super.rateBoard(board);		return 10000 - score;	}	}

⌨️ 快捷键说明

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