Skip to content

Commit

Permalink
add game end handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveed Ahmad authored and Naveed Ahmad committed Aug 12, 2011
1 parent a90c2ff commit 564ebf5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Binary file modified bin/GamePack.apk
Binary file not shown.
Binary file modified bin/classes.dex
Binary file not shown.
Binary file modified bin/com/nav/gamepack/puzzle/jigsaw/JigsawBoardView.class
Binary file not shown.
4 changes: 4 additions & 0 deletions src/com/nav/gamepack/puzzle/jigsaw/JigsawBoardView.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,13 @@ private int findClickedCellIndex(final float x, final float y) {
*/
public boolean onTouchEvent(MotionEvent event) {
int cellIndex = findClickedCellIndex(event.getX(), event.getY());
// TODO handle Click should return true if any cell is swap
//and call invalidate only if it return true
if (cellIndex >= 0)
handelClick(cellIndex);
invalidate();
if(isGameOver())
new AlertDialog.Builder(context).setMessage("GAme Over").setTitle("U Rocks").setNegativeButton("OK ",null).show();
return false;
}

Expand Down

0 comments on commit 564ebf5

Please sign in to comment.