leftl.java

来自「俄罗斯方块游戏」· Java 代码 · 共 57 行

JAVA
57
字号
import java.awt.*;
public class LeftL extends SquareShape {
	private Color leftLColor=new Color(0,0,255);
	public LeftL() {
		super();
		this.color=leftLColor;
		// TODO Auto-generated constructor stub
	}

	protected void defaultRotate() {
		// TODO Auto-generated method stub
		for(int i=0;i<3;i++)
		{
			postion[i][0]=xpos;
			postion[i][1]=ypos+i*20;
		}
		postion[3][0]=xpos+20;
		postion[3][1]=ypos+40;

	}

	protected void firstRotate() {
		// TODO Auto-generated method stub
		for(int i=0;i<3;i++)
		{
			postion[i][0]=xpos+(i-1)*20;
			postion[i][1]=ypos;
		}
		postion[3][0]=xpos-20;
		postion[3][1]=ypos+20;
	}

	protected void secondRotate() {
		// TODO Auto-generated method stub
		for(int i=0;i<3;i++)
		{
			postion[i][0]=xpos;
			postion[i][1]=ypos+i*20;
		}
		postion[3][0]=xpos-20;
		postion[3][1]=ypos;
	}

	protected void thirdRotate() {
		// TODO Auto-generated method stub
		for(int i=0;i<3;i++)
		{
			postion[i][0]=xpos+(i-1)*20;
			postion[i][1]=ypos+20;
		}
		postion[3][0]=xpos+20;
		postion[3][1]=ypos;
		
	}

}

⌨️ 快捷键说明

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