1. Thririot Christophe
  2. CubeOfCoffee

Commits

Christophe Thiriot  committed 692515f

one more bug for last command fixed

  • Participants
  • Parent commits db1f345
  • Branches default

Comments (0)

Files changed (2)

File coffee/app.coffee

View file
     last : =>
         window.setTimeout =>
             if @mode is 'stop'
-                @current = 0 if @current is -1
                 remaining_turnlist = @turnlist[@current+1..@turnlist.length-1]
                 @view.straightturn(remaining_turnlist.join(''))
                 @current = @turnlist.length

File js/app.js

View file
       return window.setTimeout(function() {
         var remaining_turnlist;
         if (_this.mode === 'stop') {
-          if (_this.current === -1) {
-            _this.current = 0;
-          }
           remaining_turnlist = _this.turnlist.slice(_this.current + 1, (_this.turnlist.length - 1) + 1 || 9e9);
           _this.view.straightturn(remaining_turnlist.join(''));
           return _this.current = _this.turnlist.length;