point.java

来自「j2me快乐蛇0.2版代码,内有经典版贪食蛇和新版」· Java 代码 · 共 40 行

JAVA
40
字号
/////////////////////////////////////// struct for point                ///////////////////////////////////////public class POINT {	public int x;	public int y;	public int color;		public POINT(int xx,int yy) {		x=xx;		y=yy;		// TODO: Add your code here	}	public POINT(int xx,int yy,int cc) {		x=xx;		y=yy;		color=cc;		// TODO: Add your code here	}	public POINT(){		x=0;		y=0;	}		public POINT(POINT p){		x=p.x;		y=p.y;	}	public void setPoint(int xx,int yy){		x=xx;		y=yy;	}	public static boolean samePoint(POINT p1,POINT p2){		return ((p1.x==p2.x)&&(p1.y==p2.y));	}	public String toString() {		return ("("+x+","+y+",color "+color+")");	}}

⌨️ 快捷键说明

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