【发布时间】:2015-01-13 19:10:09
【问题描述】:
我正在为我的 AP Comp Sci 课程制作一个名为“Titris”的俄罗斯方块克隆,并且在遇到任何错误时我得到了这个。它来自这段代码
private void paintSquare(Graphics g1, int x, int y) {
Color color = matrix[y][x];
int xMin = x * squareSize.width;
int yMin = y * squareSize.height;
int xMax = xMin + squareSize.width - 1;
int yMax = yMin + squareSize.height - 1;
int i;
bufferRect.x = xMin;
bufferRect.y = yMin;
bufferRect.width = squareSize.width;
bufferRect.height = squareSize.height;
if (!bufferRect.intersects(g1.getClipBounds())) {
return;
}
来自paintSquare的错误
请帮忙,这个项目很快就要到期了,我不知道该怎么处理这个错误。
【问题讨论】:
-
以后在询问无法编译的代码时,您应该包括来自编译器的错误。
-
为什么你的方法减速后有个分号?
标签: java variables void tetris