<commit_before>var fontBrief=[
	{font:"30px myKaiti", fill:"yellow", boundsAlignH:"top", boundsAlignV:"middle"},
	{font:"30px myKaiti", fill:"white", boundsAlignH:"top", boundsAlignV:"middle"},
	{font:"30px myKaiti", fill:"lightgreen", boundsAlignH:"top", boundsAlignV:"middle"}
];

var TileBriefInfoView={
    style:{font: "30px myKaiti", fill: "#ffffff", wordWrap: true, wordWrapWidth: 500, boundsAlignH: "center", boundsAlignV: "middle" , backgroundColor: "#ffff00" },
	createNew: function(index){
		/* global MainGame */
		var game=MainGame.game;
		// bg
		var view=game.add.sprite(0,0,"tile_hover_backpanel");
		// label position
		var centerPos={x:view.texture.width*0.5, y:view.texture.height*0.5-30};
		// tile index
		view.index=index;

		// creates 3 lines
		var lines=["terrain", "building", "people"];
		for(var i=0;i<lines.length;i++){
			var oneLine=game.make.text(centerPos.x, centerPos.y+35*i,"",fontBrief[i]);
			oneLine.anchor.x=0.5;
			oneLine.anchor.y=0.5;
			view.addChild(oneLine);
			view[lines[i]]=oneLine;
		}
		// Class members
		// You can use:
		// view.terrain, view.building, view.people

		// Class func
		view.updateInfo=function(tile){return TileBriefInfoView.updateInfo(view,tile)};
		view.updatePos=function(){return TileBriefInfoView.updatePos(view)};
		return view;
	},
	updateInfo: function(t, tile){
		console.assert(tile);
        // Let's figure out what kind of info we need to display
        t.terrain.text=tile.terrain.key+ (tile.getResType()?" ("+tile.getResType()+")":"" );

        if(tile.hasBuilding()){
        	var bld=tile.getBuilding();
        	var bldStr=bld.name.toUpperCase();
        	t.building.text=bldStr;
        	t.people.text="with people:"+bld.people+"/"+bld.maxPeople;
        }
	},
	updatePos: function(t){
        /*global MainGame*/
        var board=MainGame.board;
        var tile=board.at(t.index);
        t.x=board.x+tile.x*board.currentScale;
        t.y=board.y+tile.y*board.currentScale;
        t.scale.set(board.currentScale);<commit_msg>Improved the color of the mouse-over menu<commit_after>var fontBrief=[
	{font:"30px myKaiti", fill:"white", boundsAlignH:"top", boundsAlignV:"middle"},
	{font:"30px myKaiti", fill:"white", boundsAlignH:"top", boundsAlignV:"middle"},
	{font:"30px myKaiti", fill:"lightgreen", boundsAlignH:"top", boundsAlignV:"middle"}
];

var TileBriefInfoView={
    style:{font: "30px myKaiti", fill: "#ffffff", wordWrap: true, wordWrapWidth: 500, boundsAlignH: "center", boundsAlignV: "middle" , backgroundColor: "#ffff00" },
	createNew: function(index){
		/* global MainGame */
		var game=MainGame.game;
		// bg
		var view=game.add.sprite(0,0,"tile_hover_backpanel");
		// label position
		var centerPos={x:view.texture.width*0.5, y:view.texture.height*0.5-30};
		// tile index
		view.index=index;

		// creates 3 lines
		var lines=["terrain", "building", "people"];
		for(var i=0;i<lines.length;i++){
			var oneLine=game.make.text(centerPos.x, centerPos.y+35*i,"",fontBrief[i]);
			oneLine.anchor.set(0.5);
			view.addChild(oneLine);
			view[lines[i]]=oneLine;
		}
		// Class vars
		// view.terrain
		// view.building
		// view.people
		// --- the above class vars can be accessed now ---

		// Class func
		view.updateInfo=function(tile){return TileBriefInfoView.updateInfo(view,tile)};
		view.updatePos=function(){return TileBriefInfoView.updatePos(view)};
		return view;
	},
	updateInfo: function(t, tile){
		console.assert(tile);
        // show terrain+res info
        t.terrain.text=tile.terrain.key+ (tile.getResType()?" ("+tile.getResType()+")":"" );

        // show building+people info
        if(tile.hasBuilding()){
        	// show building info
        	var bld=tile.getBuilding();
        	t.building.text=bld.name.toUpperCase();
        	// show people info
        	if(bld.maxPeople){
	        	if(bld.subtype==="housing")
	        		t.people.text="Residents:"+bld.people+"/"+bld.maxPeople;
	        	else
	        		t.people.text="Jobs:"+bld.people+"/"+bld.maxPeople;
        	}
        	else
        		t.people.text=" - "
        	// now add color!
        	var colorTable={"?":"yellow", "!":"orangered", "$":"seagreen", "-":"white"};
        	console.assert(colorTable[bld.type], "Unknown building type! Must be ?(bureau), !(mil) or $(commercial).");
        	t.building.addColor(colorTable[bld.type],0);
        	t.people.addColor(colorTable[bld.type],0);
        }
	},
	updatePos: function(t){
        /*global MainGame*/
        var board=MainGame.board;
        var tile=board.at(t.index);
        t.x=board.x+tile.x*board.currentScale;
        t.y=board.y+tile.y*board.currentScale;
        t.scale.set(board.currentScale);
{'fraction_non_alphanumeric': 0.17719072164948454, 'fraction_numerical': 0.01245704467353952, 'mean_word_length': 3.5082284607938043, 'pattern_counts': {'":': 6, '<': 5, '<?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': '4843574', 'n_tokens_mistral': 1758, 'n_tokens_neox': 1645, 'n_words': 273}