comparison game/Engine.java @ 139:be9cc2ee3c16

Minor fixes in updating logic.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 Nov 2011 11:05:36 +0200
parents 9eb791e2fa17
children f3703e617342
comparison
equal deleted inserted replaced
138:9eb791e2fa17 139:be9cc2ee3c16
420 currPiece = nextPiece; 420 currPiece = nextPiece;
421 nextPiece = tmp; 421 nextPiece = tmp;
422 board[currX][currY] = currPiece; 422 board[currX][currY] = currPiece;
423 currPiece.changed(); 423 currPiece.changed();
424 nextPiece.changed(); 424 nextPiece.changed();
425 flagBoardIsDirty = true;
425 } 426 }
426 } 427 }
427 428
428 // Check one piece, set connections, find the new placement 429 // Check one piece, set connections, find the new placement
429 // based on piece rotations etc. 430 // based on piece rotations etc.
525 // If game over, clear the game 526 // If game over, clear the game
526 if (flagGameOver) 527 if (flagGameOver)
527 { 528 {
528 currPiece = null; 529 currPiece = null;
529 } 530 }
531
532 flagBoardIsDirty = true;
530 } 533 }
531 534
532 public boolean mouseWheelMoved(MouseWheelEvent e) 535 public boolean mouseWheelMoved(MouseWheelEvent e)
533 { 536 {
534 int notches = e.getWheelRotation(); 537 int notches = e.getWheelRotation();