public void logic(){
		//Expanding of a platform
		if(ticksToExpand > 0){
			blackSpace.x -= (blackSpace.x)/ticksToExpand;
			blackSpace.width += (blackSpace.x)/ticksToExpand + (m.getWidth() - blackSpace.x-blackSpace.width)/ticksToExpand;
			blackSpace.height += (m.getHeight() + viewPointY - blackSpace.y - blackSpace.height)/ticksToExpand;
			viewPointY += (safeGround-m.getHeight()-viewPointY+50)/ticksToExpand;
			ticksToExpand--;
		}
		//Finished expanding
		if(ticksToExpand==0){
			blackSpace=null;
			viewPointY=safeGround-m.getHeight()+50;
			ticksToExpand=-1;
			ticksToDie=dyingTicks;
		}
		//Movement of the screen downwards with passing time
		if(ticksToDie > 0 && ticksToExpand == -1){
			viewPointY = safeGround-m.getHeight()+50-(int)(50f*(dyingTicks-ticksToDie)/dyingTicks);
			ticksToDie--;
		}
		//Dying by running out of time
		if(ticksToDie==0){
			lose();
		}
		//Logic of player and platforms
		player.logic(safeGround);
		for(Platform p : platformsToAdd){
			platforms.add(p);
		}
		platformsToAdd.clear();
		for(Platform p : platformsToRemove){
			platforms.remove(p);
		}
		platformsToRemove.clear();
		for(Platform p : platforms){
			p.logic(player);
		}
	}