public void update(){
		if(!won && !dead){
			if(hasStarted){
				elapsedMS = (System.nanoTime() - startTime)/1000000;
				formattedTime = formatTime(elapsedMS);
			}
			else{
				startTime = System.nanoTime();
			}
		}
		
		
		checkKeys();
		
		if(score >= highScore){
			highScore = score;
		}
		
		for (int row = 0; row < ROWS; row++) {
			for (int col = 0; col < COLS; col++) {
				Tile current = board[row][col];
				if(current == null)continue;
				current.update();
				resetPosition(current, row, col);
				
				if(current.getValue() == 2048){
					won = true;
				}
			}
		}	
	}