@Override
	public void mouseReleased(MouseEvent arg0) {
		Point mousePosition = getMouseLocation(arg0);
		if (startOfPress != null && board.isValidPoint(mousePosition)) {
			int oldColor = board.getPieceColor(startOfPress);
			boolean canMove = move(startOfPress, mousePosition);
			hidePossibleMoves();
			int sx = startOfPress.getRow();
			int sy = startOfPress.getCol();
			int ex = mousePosition.getRow();
			int ey = mousePosition.getCol();
			if (canMove) {
				hideChecker(ex, ey);
				hideChecker(sx, sy);
				if (oldColor == 1) {
					viewChecker(ex, ey, whitePieceImage);
				} else {
					viewChecker(ex, ey, blackPieceImage);
				}
				hidePossibleMoves();
				controller.move(startOfPress, mousePosition);
			} else {
				hideChecker(sx, sy);
				if (oldColor == 1) {
					viewChecker(sx, sy, whitePieceImage);
				} else {
					viewChecker(sx, sy, blackPieceImage);
				}
				hidePossibleMoves();
			}
			dragLevel = 0;
			startOfPress = null;
		}
	}