<commit_before>function actionWrapper(callback, cost){
    return function(menu){
        var outcome = game.tryAction(cost);
        if (outcome === "success"){
            //menu.remove();
            callback();
            game.passTime(cost);
            //game.view.showMenu(game.view.room, 500, 50, game.roomMenu)
        }else if (outcome === "notEnoughTime"){
            alert("You don't have enough time to do that.");
        }else{
            alert("You can't do that.")
        }
    }
}

function submenuWrapper(actions){
    return function(menu){
        var mX = menu.x,
            mY = menu.y;
            menu.remove();
            game.view.showMenu(game.view.activeCanvas, mX, mY, actions);
    }
}

var ACTIONS = {
    computer: {
        name: 'Computer',
        callback: function(){
                window.game.view.setDisplay(window.game.view.computer);
            },
            description: 'Money, people, things.'
        },
    eat: {
        name: 'Eat',
        callback: function(menu){
                menu.remove();
                game.view.showMenu(game.view.activeCanvas, 500, 50, game.eatMenu);
            },
            description: 'I guess I should eat something.'
        },
    sleep: {
        name: 'Sleep',
        callback: actionWrapper(function(){
            alert("So tired...");
            game.adjustMorale(0.2);
            game.adjustRest(0.5);
            game.adjustStomach(-0.2);
        }, 4)
        description: 'I could sleep my life away...'
    }
    bathe: {
        name: 'Bathe',
        callback: actionWrapper(function(){
                alert("Clean!");
                game.adjustMorale(0.2);
                game.adjustRest(-0.2);
            }, 1),
            description: 'It is easier than laundry.'
        },
    wait: {
        name: 'Wait',
        callback: actionWrapper(function(){
                alert("You wait for half of a day...");
            }, 5),
        description: '...'
        },<commit_msg>added syntax<commit_after>function actionWrapper(callback, cost){
    return function(menu){
        var outcome = game.tryAction(cost);
        if (outcome === "success"){
            //menu.remove();
            callback();
            game.passTime(cost);
            //game.view.showMenu(game.view.room, 500, 50, game.roomMenu)
        }else if (outcome === "notEnoughTime"){
            alert("You don't have enough time to do that.");
        }else{
            alert("You can't do that.")
        }
    }
}

function submenuWrapper(actions){
    return function(menu){
        var mX = menu.x,
            mY = menu.y;
            menu.remove();
            game.view.showMenu(game.view.activeCanvas, mX, mY, actions);
    }
}

var ACTIONS = {
    computer: {
        name: 'Computer',
        callback: function(){
                window.game.view.setDisplay(window.game.view.computer);
            },
            description: 'Money, people, things.'
        },
    eat: {
        name: 'Eat',
        callback: function(menu){
                menu.remove();
                game.view.showMenu(game.view.activeCanvas, 500, 50, game.eatMenu);
            },
            description: 'I guess I should eat something.'
        },
    sleep: {
        name: 'Sleep',
        callback: actionWrapper(function(){
            alert("So tired...");
            game.adjustMorale(0.2);
            game.adjustRest(0.5);
            game.adjustStomach(-0.2);
        }, 4)
        description: 'I could sleep my life away...'
    },
    bathe: {
        name: 'Bathe',
        callback: actionWrapper(function(){
                alert("Clean!");
                game.adjustMorale(0.2);
                game.adjustRest(-0.2);
            }, 1),
            description: 'It is easier than laundry.'
        },
    wait: {
        name: 'Wait',
        callback: actionWrapper(function(){
                alert("You wait for half of a day...");
            }, 5),
        description: '...'
        },
{'fraction_non_alphanumeric': 0.14089089089089088, 'fraction_numerical': 0.011511511511511512, 'mean_word_length': 1.5265486725663717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2845064', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1095, 'n_words': 251}