@Override
	protected void update(GameContext g) {
		if (isDead)
			return;
		if (ghostDuration > MAX_GHOST_DURATION)
			isGhost = false;
		color = Parameters.DOT_COLOR;
		Vector newPos = Vector.add(position, velocity);
		
		if (newPos.x < 0 || newPos.x > model.getMapDims().width - dims.width) {
			velocity.x = velocity.x * -1;
			position.x = (newPos.x < 0)?0:model.getMapDims().width - dims.width;
		}
		if (newPos.y < 0 || newPos.y > model.getMapDims().height - dims.height) {
			velocity.y = velocity.y * -1;
			position.y = (newPos.y < 0)?0:model.getMapDims().height - dims.height;
		}
		position = Vector.add(position, velocity);
		ghostDuration++;
	}