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

📄 player.java

📁 可以单人与电脑单独对战的五子棋小游戏基于JAVA 的强大功能开发!小程序可以玩一下也可以看看!
💻 JAVA
字号:
/*
 * Created on 2006-11-5
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author �¾�
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
class player {
	private String playerName;
	private String playerColor;
	boolean isActive,isComputer;
	player(String name,String color,boolean isComputer,boolean isDefault){
		setName(name);
		setColor(color);	
		isActive=isDefault;
		this.isComputer=isComputer;
		}
	void setName(String name){
		playerName=name;
	}
	void setColor(String color){
		playerColor=color;
//		System.out.println(playerColor);
	}
	String getName(){
		return this.playerName;
	}
	
	String getColor(){
		return this.playerColor;
	}
	void doingJob(int x,int y){
//		System.out.println(playerColor);
		
		
			if(this.playerColor.equals("Red")||this.playerColor.equals("White")) 
				{
				chessHead.chessMap[x][y]=2;
//				System.out.println("set white");
				}
			else 
				chessHead.chessMap[x][y]=1;

	}

}

⌨️ 快捷键说明

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