function ClassMoves()
{
    this.getImg = new createjs.Container();

    this.moves = 25;
    this.moves_save = 0;

    var bg = ss_data.clone();
    bg.gotoAndStop("top_bar_block_moves");
    this.getImg.addChild(bg);

    this.text_moves = new ClassText("", 3);
    this.text_moves.getImg.y = -devise_size;
    this.text_moves.getImg.scaleX = this.text_moves.getImg.scaleY = 0.8;
    this.getImg.addChild(this.text_moves.getImg);

    this.text = ss_data.clone();
    this.text.gotoAndStop("text_white_moves");
    this.text.y = 6*devise_size;
    this.text.scaleX = this.text.scaleY = 0.8;
    this.getImg.addChild(this.text);

    this.Upd();
}

ClassMoves.prototype.Create = function()
{
    this.moves = config.lvls[game.level_num].moves;
    this.moves_save = config.lvls[game.level_num].moves;
    this.Upd();
};

ClassMoves.prototype.Upd = function()
{
    this.text_moves.setText(Math.max(0, this.moves) + " ");
    this.text_moves.getImg.x = ((90*devise_size - this.text_moves.getImg.width*this.text_moves.getImg.scaleX - (69*devise_size)*this.text.scaleX)/2) << 0;
    this.text.x = this.text_moves.getImg.x + this.text_moves.getImg.width*this.text_moves.getImg.scaleX;
};

ClassMoves.prototype.Add = function(a)
{
    this.moves += a;
    this.moves_save = this.moves;
    this.Upd();
    if(this.moves == 0)
        game.grid.level_end = true;
};

ClassMoves.prototype.setSave = function()
{
    this.moves_save = this.moves;
};

ClassMoves.prototype.isEnd = function()
{
    return (this.moves <= 0);
};
