<commit_before>
var primitives = true;

function ggbOnInit() {

  var element = document.getElementsByClassName("toolbar_button")[0]; 
  element.setAttribute("isselected", "false"); 
  ggbApplet.debug("ggbOnInit");
  ggbApplet.registerAddListener("newObjectListener");
  function Command(cmd){ggbApplet.debug(cmd); ggbApplet.evalCommand(cmd);}
  function abspos(x,y){
  return "Corner[4] + ("+x+"*(x(Corner[3])-x(Corner[4])),"+y+"*(x(Corner[2])-x(Corner[1])))"
  }
  Command('progress = 0');
  Command('Progresstext = Text["Progress: "progress"%",'+abspos("0.011","-0.032915")+']');
  Command('countnumber = 0');
  Command ('count0 = Text["Moves: "countnumber"",'+abspos("0.85","-0.032915")+']');
	Command('W = (-10,-10)'); 
	ggbApplet.setVisible("W",false);
	Command('welldone = Text["Well done!", W]'); 		
	ggbApplet.setVisible("welldone",false);	
	}

  function Command(cmd){ggbApplet.debug(cmd); ggbApplet.evalCommand(cmd);}
    function abspos(x,y){
  return "Corner[4] + ("+x+"*(x(Corner[3])-x(Corner[4])),"+y+"*(x(Corner[2])-x(Corner[1])))"
  }
  	var count = 'Text["Count = 0",'+abspos("0.85","-0.032915")+']'
function newObjectListener(obj) {
if (ggbApplet.getObjectType(obj) === "boolean" || ggbApplet.getObjectType(obj) === "text" || ggbApplet.getObjectType(obj) === "numeric"|| obj == "W")
{return;
}


    if (ggbApplet.getObjectType(obj) == "segment" || ggbApplet.getObjectType(obj) == "circle" || ggbApplet.getObjectType(obj) == "ray" || ggbApplet.getObjectType(obj) == "line") {
ggbApplet.setColor(obj,255,204,102);
}

  function Command(cmd){ggbApplet.debug(cmd); ggbApplet.evalCommand(cmd);}

    function abspos(x,y){
  return "Corner[4] + ("+x+"*(x(Corner[3])-x(Corner[4])),"+y+"*(x(Corner[2])-x(Corner[1])))"
  }
 
var cmdString = ggbApplet.getCommandString(obj);

if (cmdString.substring(0,3) == "Ray" || (cmdString.substring(0,2) == "Eq" && ggbApplet.getObjectType(obj)=="point") || cmdString.substring(0,3) == "Seg" ||cmdString.substring(0,3) == "Cir" || cmdString.substring(0,3) == "Mid" || cmdString.substring(0,13) == "AngleBisector" || cmdString.substring(0,4) == "Perp" || cmdString.substring(0,4) == "Line" || (cmdString.substring(0,5) == "Trans"&& ggbApplet.getObjectType(obj)=="point")){
	Command('countnumber = countnumber + 1');
if (!(cmdString.substring(0,3) == "Ray" || cmdString.substring(0,3) == "Seg" || cmdString.substring(0,3) == "Cir") && primitives) { primitives = false;}

function isLowerCase(myString) { 
  return (myString == myString.toLowerCase()); 
}


var lastcomma = cmdString.lastIndexOf(",");
if(cmdString.substring(0,3) == "Cir" && (isLowerCase(cmdString.substring(lastcomma+2,lastcomma+3)) || cmdString.substring(lastcomma+2,lastcomma+4) =="Se" || cmdString.substring(lastcomma+2,lastcomma+4) =="Ra"))
{
primitives = false;}	
}<commit_msg>fix 3 points compass primitive bug<commit_after>
var primitives = true;

function ggbOnInit() {

  var element = document.getElementsByClassName("toolbar_button")[0]; 
  element.setAttribute("isselected", "false"); 
  ggbApplet.debug("ggbOnInit");
  ggbApplet.registerAddListener("newObjectListener");
  function Command(cmd){ggbApplet.debug(cmd); ggbApplet.evalCommand(cmd);}
  function abspos(x,y){
  return "Corner[4] + ("+x+"*(x(Corner[3])-x(Corner[4])),"+y+"*(x(Corner[2])-x(Corner[1])))"
  }
  Command('progress = 0');
  Command('Progresstext = Text["Progress: "progress"%",'+abspos("0.011","-0.032915")+']');
  Command('countnumber = 0');
  Command ('count0 = Text["Moves: "countnumber"",'+abspos("0.85","-0.032915")+']');
	Command('W = (-10,-10)'); 
	ggbApplet.setVisible("W",false);
	Command('welldone = Text["Well done!", W]'); 		
	ggbApplet.setVisible("welldone",false);	
	}

  function Command(cmd){ggbApplet.debug(cmd); ggbApplet.evalCommand(cmd);}
    function abspos(x,y){
  return "Corner[4] + ("+x+"*(x(Corner[3])-x(Corner[4])),"+y+"*(x(Corner[2])-x(Corner[1])))"
  }
  	var count = 'Text["Count = 0",'+abspos("0.85","-0.032915")+']'
function newObjectListener(obj) {
if (ggbApplet.getObjectType(obj) === "boolean" || ggbApplet.getObjectType(obj) === "text" || ggbApplet.getObjectType(obj) === "numeric"|| obj == "W")
{return;
}


    if (ggbApplet.getObjectType(obj) == "segment" || ggbApplet.getObjectType(obj) == "circle" || ggbApplet.getObjectType(obj) == "ray" || ggbApplet.getObjectType(obj) == "line") {
ggbApplet.setColor(obj,255,204,102);
}

  function Command(cmd){ggbApplet.debug(cmd); ggbApplet.evalCommand(cmd);}

    function abspos(x,y){
  return "Corner[4] + ("+x+"*(x(Corner[3])-x(Corner[4])),"+y+"*(x(Corner[2])-x(Corner[1])))"
  }
 
var cmdString = ggbApplet.getCommandString(obj);

if (cmdString.substring(0,3) == "Ray" || (cmdString.substring(0,2) == "Eq" && ggbApplet.getObjectType(obj)=="point") || cmdString.substring(0,3) == "Seg" ||cmdString.substring(0,3) == "Cir" || cmdString.substring(0,3) == "Mid" || cmdString.substring(0,13) == "AngleBisector" || cmdString.substring(0,4) == "Perp" || cmdString.substring(0,4) == "Line" || (cmdString.substring(0,5) == "Trans"&& ggbApplet.getObjectType(obj)=="point")){
	Command('countnumber = countnumber + 1');
if (!(cmdString.substring(0,3) == "Ray" || cmdString.substring(0,3) == "Seg" || cmdString.substring(0,3) == "Cir") && primitives) { primitives = false;}

function isLowerCase(myString) { 
  return (myString == myString.toLowerCase()); 
}


var lastcomma = cmdString.indexOf(",");
if(cmdString.substring(0,3) == "Cir" && (isLowerCase(cmdString.substring(lastcomma+2,lastcomma+3)) || cmdString.substring(lastcomma+2,lastcomma+4) =="Se" || cmdString.substring(lastcomma+2,lastcomma+4) =="Ra"))
{
primitives = false;}	
}
{'fraction_non_alphanumeric': 0.23577670768682005, 'fraction_numerical': 0.035134653112181204, 'mean_word_length': 6.965909090909091, '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': '2848793', 'n_tokens_mistral': 2281, 'n_tokens_neox': 2178, 'n_words': 277}