function fadeIn($box, time) {
  $box.css('opacity', 0);
  var last = +new Date();
  var tick = function() {
    $box.css('opacity', +$box.css('opacity') + (new Date() - last) / time);
    last = +new Date();
    if (+$box.css('opacity') < 1) {
      (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);
    }
  };

  tick();
}
//Helps to create a fadeIn with the objective of showing which was the AI move
Helps to create a fadeIn with the objective of showing which was the AI move
Helps to create a fadeIn with the objective of showing which was the AI move
function fadeIn($box, time) {
  $box.css('opacity', 0);
  var last = +new Date();
  var tick = function() {
    $box.css('opacity', +$box.css('opacity') + (new Date() - last) / time);
    last = +new Date();
    if (+$box.css('opacity') < 1) {
      (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);
    }
  };
  tick();
}
function fadeIn ( $box , time ) { $box . css ( 'opacity' , 0 ) ; var last = + new Date ( ) ; var tick = function ( ) { $box . css ( 'opacity' , + $box . css ( 'opacity' ) + ( new Date ( ) - last ) / time ) ; last = + new Date ( ) ; if ( + $box . css ( 'opacity' ) < 1 ) { ( window . requestAnimationFrame && requestAnimationFrame ( tick ) ) || setTimeout ( tick , 16 ) ; } } ; tick ( ) ; }
Helps to create a fadeIn with the objective of showing which was the AI move
Helps to create a fadeIn with the objective of showing which was the AI move