function Game(gameObjectWidth, gameObjectHeight, wrapperWidth, gameBlockWidth, sidebarWidth, maxGameObjectWidth)
{
    this.gameObjectWidth = gameObjectWidth;
    this.gameObjectHeight = gameObjectHeight;
    this.wrapperWidth = wrapperWidth;
    this.gameBlockWidth = gameBlockWidth;
    this.sidebarWidth = sidebarWidth;
    this.maxGameObjectWidth = maxGameObjectWidth;
}

Game.prototype.initSize = function()
{
    try
    {
        multiplySize = this.gameObjectWidth / this.maxGameObjectWidth;
        if (multiplySize > 1)
        {
            this.resize(multiplySize);
        }
    }
    catch(e) {}
}

Game.prototype.resize = function(multiplySize)
{
    var wrapperWidth = this.wrapperWidth;
    var gameBlockWidth = this.gameBlockWidth;
    var gameObjectWidth = this.gameObjectWidth * multiplySize;
    var gameObjectHeight = this.gameObjectHeight * multiplySize;

    if (this.gameObjectWidth * multiplySize > this.maxGameObjectWidth)
    {
        wrapperWidth = wrapperWidth * multiplySize - (this.sidebarWidth * multiplySize - this.sidebarWidth);
        gameBlockWidth = gameBlockWidth * multiplySize;
        gameObjectWidth = this.maxGameObjectWidth * multiplySize;
        gameObjectHeight = this.gameObjectHeight / (this.gameObjectWidth / this.maxGameObjectWidth) * multiplySize;
    }

    $("#wrapper").width(wrapperWidth);
    $(".game-block").width(gameBlockWidth);
    $('#gameObject').width(gameObjectWidth);
    $('#gameObject').height(gameObjectHeight);
}
