• 大小: 170KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-07-21
  • 语言: 其他
  • 标签: Java源码  

资源简介

俄罗斯方块源码,完整实现,对应的代码说明详见我的博客,http://blog.csdn.net/codehxy/article/details/25532055

资源截图

代码片段和文件信息

package com.hsj.tetris;

import java.awt.Image;

/**
 * 格子 
 */
public class Cell {
private int row;
private int col;
//private int color;
private Image image;//格子的贴图

public Cell() {
}

public Cell(int row int col Image image) {
super();
this.row = row;
this.col = col;
this.image = image;
}

public int getRow() {
return row;
}

public void setRow(int row) {
this.row = row;
}

public int getCol() {
return col;
}

public void setCol(int col) {
this.col = col;
}


public Image getImage() {
return image;
}

public void setImage(Image image) {
this.image = image;
}

public void moveRight(){
col++;
//System.out.println(“Cell moveRight()“ + col); 
}

public void moveLeft(){
col--;
}

public void moveDown(){
row++;
}

@Override
public String toString() {
return “[“+row+““+col+“]“;
}
}







 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         301  2013-08-15 12:06  .classpath
     文件         382  2014-05-11 10:00  .project
     目录           0  2014-05-11 10:10  .settings\
     文件         629  2013-08-15 12:06  .settings\org.eclipse.jdt.core.prefs
     目录           0  2014-05-11 10:10  bin\
     目录           0  2014-05-11 10:10  bin\com\
     目录           0  2014-05-11 10:10  bin\com\hsj\
     目录           0  2014-05-11 10:10  bin\com\hsj\tetris\
     文件        1615  2014-05-11 10:10  bin\com\hsj\tetris\Cell.class
     文件         772  2014-05-11 10:10  bin\com\hsj\tetris\I.class
     文件        3008  2013-06-21 22:17  bin\com\hsj\tetris\I.png
     文件         816  2014-05-11 10:10  bin\com\hsj\tetris\J.class
     文件        3007  2013-06-21 22:15  bin\com\hsj\tetris\J.png
     文件         816  2014-05-11 10:10  bin\com\hsj\tetris\L.class
     文件        3000  2013-06-21 22:16  bin\com\hsj\tetris\L.png
     文件         770  2014-05-11 10:10  bin\com\hsj\tetris\O.class
     文件        3004  2013-06-21 22:19  bin\com\hsj\tetris\O.png
     文件       14093  2013-08-15 12:05  bin\com\hsj\tetris\rotatState.png
     文件         770  2014-05-11 10:10  bin\com\hsj\tetris\S.class
     文件        3000  2013-06-21 22:18  bin\com\hsj\tetris\S.png
     文件         816  2014-05-11 10:10  bin\com\hsj\tetris\T.class
     文件        2989  2013-06-21 22:20  bin\com\hsj\tetris\T.png
     文件        1402  2014-05-11 10:10  bin\com\hsj\tetris\Tetris$1.class
     文件         608  2014-05-11 10:10  bin\com\hsj\tetris\Tetris$2.class
     文件         611  2014-05-11 10:10  bin\com\hsj\tetris\Tetris$3.class
     文件        8850  2014-05-11 10:10  bin\com\hsj\tetris\Tetris.class
     文件       44394  2013-06-20 17:57  bin\com\hsj\tetris\tetris.png
     文件         834  2014-05-11 10:10  bin\com\hsj\tetris\Tetromino$State.class
     文件        2640  2014-05-11 10:10  bin\com\hsj\tetris\Tetromino.class
     文件         770  2014-05-11 10:10  bin\com\hsj\tetris\Z.class
     文件        3006  2013-06-21 22:19  bin\com\hsj\tetris\Z.png
............此处省略16个文件信息

评论

共有 条评论