<commit_before>var toggler = true;
var muteButton;

export function toggle(game, soundText) {
	muteButton = game.input.keyboard.addKey(Phaser.Keyboard.M);

	if(muteButton.isDown) {
		toggler = !toggler;
		game.sound.mute = toggler;
		soundText.text = (toggler) ? "Sound: OFF" : "Sound: ON";
	}
}

export function reset() {
	toggler = true;
}
//TODO: Unit test and add reset function for toggler when gameover<commit_msg>fixed small bug in sound.js<commit_after>var toggler = false;
var muteButton;

export function toggle(game, soundText) {
	this.game = game;
	muteButton = game.input.keyboard.addKey(Phaser.Keyboard.M);

	if(muteButton.isDown) {
		toggler = !toggler;
		game.sound.mute = toggler;
		soundText.text = (toggler) ? "Sound: OFF" : "Sound: ON";
	}
}

export function reset() {
	toggler = false;
	this.game.sound.mute = toggler;
}
//TODO: Unit test and add reset function for toggler when gameover
{'fraction_non_alphanumeric': 0.1288546255506608, 'fraction_numerical': 0.0, 'mean_word_length': 4.410714285714286, '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': '1737630', 'n_tokens_mistral': 343, 'n_tokens_neox': 341, 'n_words': 83}