public void undoLastMove() {
		if (moveHistorySokoX.size() > 0 && moveHistorySokoY.size() > 0
				&& Direction.size() > 0) {

			if ((Direction.elementAt(Direction.size() - 1) == left)) {

				undoBaggMove(LEFT_COLLISION);
			}

			if ((Direction.elementAt(Direction.size() - 1) == right)) {

				undoBaggMove(RIGHT_COLLISION);
			}

			if ((Direction.elementAt(Direction.size() - 1) == top)) {

				undoBaggMove(TOP_COLLISION);
			}

			if ((Direction.elementAt(Direction.size() - 1) == bottom)) {

				undoBaggMove(BOTTOM_COLLISION);
			}

			soko.move(moveHistorySokoX.remove(moveHistorySokoX.size() - 1),
					moveHistorySokoY.remove(moveHistorySokoY.size() - 1));
		}
	}