<commit_before>//
// パズル固有スクリプト部 カントリーロード・月か太陽・温泉めぐり版 country.js
//
(function(pidlist, classbase){
	if(typeof module==='object' && module.exports){module.exports = [pidlist, classbase];}
	else{ pzpr.classmgr.makeCustom(pidlist, classbase);}
}(
['country','moonsun','onsen'], {
//---------------------------------------------------------
// マウス入力系
MouseEvent:{
	redline : true,
	
	mouseinput : function(){
		if(this.puzzle.playmode){
			if(this.mousestart || this.mousemove){
				if(this.btn==='left'){ this.inputLine();}
				else if(this.btn==='right' && this.pid!=='country'){ this.inputpeke();}
			}
			else if(this.mouseend && this.notInputted() && this.pid!=='onsen'){
				this.inputMB();
			}
		}
		else if(this.puzzle.editmode){
			if(this.mousestart || this.mousemove){
				this.inputborder();
			}
			else if(this.mouseend && this.notInputted()){
				this.inputqnum();
			}
		}
	}
},
"MouseEvent@moonsun":{
	// オーバーライド
	inputMB : function(){
		var border = this.getpos(0.22).getb();
		if(border.group==='border' && !border.isnull){
			this.inputpeke();
			return;
		}
		
		var cell = this.getcell();
		if(cell.isnull || cell.qnum===-1){ return;}
		var clist = cell.room.clist.filter(function(cell2){ return cell.qnum===cell2.qnum;});
		var val = (cell.qsub===0?2:0);
		for(var i=0;i<clist.length;i++){
			clist[i].setQsub(val);
			clist[i].draw();
		}
	}
},

//---------------------------------------------------------
// キーボード入力系
KeyEvent:{
	enablemake : true
},

//---------------------------------------------------------
// 盤面管理系
"Cell@country,onsen":{
	maxnum : function(){
		return Math.min(255, this.room.clist.length);
	}
},
"Cell@moonsun":{
	disInputHatena : true,
	numberAsObject : true,

	maxnum : 2,

	posthook : {
		qnum : function(num){ this.room.countMarkAndLine();}
	}
},
"Border@moonsun":{
	posthook : {
		line : function(num){
			var room1 = this.sidecell[0].room, room2 = this.sidecell[1].room;
			room1.countMarkAndLine();
			if(room1!==room2){ room2.countMarkAndLine();}
		}
	}
},
Board:{
	hasborder : 1
},
"Board@onsen":{
	addExtraInfo : function(){
		this.lineblkgraph = this.addInfoList(this.klass.LineBlockGraph);
	}
},
<commit_msg>onsen: Change default size to 8x8<commit_after>//
// パズル固有スクリプト部 カントリーロード・月か太陽・温泉めぐり版 country.js
//
(function(pidlist, classbase){
	if(typeof module==='object' && module.exports){module.exports = [pidlist, classbase];}
	else{ pzpr.classmgr.makeCustom(pidlist, classbase);}
}(
['country','moonsun','onsen'], {
//---------------------------------------------------------
// マウス入力系
MouseEvent:{
	redline : true,
	
	mouseinput : function(){
		if(this.puzzle.playmode){
			if(this.mousestart || this.mousemove){
				if(this.btn==='left'){ this.inputLine();}
				else if(this.btn==='right' && this.pid!=='country'){ this.inputpeke();}
			}
			else if(this.mouseend && this.notInputted() && this.pid!=='onsen'){
				this.inputMB();
			}
		}
		else if(this.puzzle.editmode){
			if(this.mousestart || this.mousemove){
				this.inputborder();
			}
			else if(this.mouseend && this.notInputted()){
				this.inputqnum();
			}
		}
	}
},
"MouseEvent@moonsun":{
	// オーバーライド
	inputMB : function(){
		var border = this.getpos(0.22).getb();
		if(border.group==='border' && !border.isnull){
			this.inputpeke();
			return;
		}
		
		var cell = this.getcell();
		if(cell.isnull || cell.qnum===-1){ return;}
		var clist = cell.room.clist.filter(function(cell2){ return cell.qnum===cell2.qnum;});
		var val = (cell.qsub===0?2:0);
		for(var i=0;i<clist.length;i++){
			clist[i].setQsub(val);
			clist[i].draw();
		}
	}
},

//---------------------------------------------------------
// キーボード入力系
KeyEvent:{
	enablemake : true
},

//---------------------------------------------------------
// 盤面管理系
"Cell@country,onsen":{
	maxnum : function(){
		return Math.min(255, this.room.clist.length);
	}
},
"Cell@mo<EMAIL>":{
	disInputHatena : true,
	numberAsObject : true,

	maxnum : 2,

	posthook : {
		qnum : function(num){ this.room.countMarkAndLine();}
	}
},
"Border@moonsun":{
	posthook : {
		line : function(num){
			var room1 = this.sidecell[0].room, room2 = this.sidecell[1].room;
			room1.countMarkAndLine();
			if(room1!==room2){ room2.countMarkAndLine();}
		}
	}
},
Board:{
	hasborder : 1
},
"Board@onsen":{
	cols : 8,
	rows : 8,

	addExtraInfo : function(){
		this.lineblkgraph = this.addInfoList(this.klass.LineBlockGraph);
	}
},

{'fraction_non_alphanumeric': 0.26857142857142857, 'fraction_numerical': 0.011428571428571429, 'mean_word_length': 2.8218340611353714, 'pattern_counts': {'":': 10, '<': 6, '<?xml version=': 0, '>': 4, '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': '1742614', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1695, 'n_words': 239}