<commit_before>var allScreens = [];

//array for situation
var situation = ['one', 'two', 'three', 'four', 'five', 'six'];

//array for the options that go with the situations
var action = [['a', 'b'], ['c', 'd'], ['e', 'f'], ['g', 'h'], ['i', 'j'], ['k', 'l']];

//global vars
var setSit = document.getElementById('sit');
var choices = document.getElementById('opts');

function Screen(situation, action) {
  this.situation = situation;
  this.action = action;
  allScreens.push(this);
}

//instances
new Screen(situation['one'], option['a', 'b']);
new Screen(situation['two'], option['c', 'd']);
new Screen(situation['three'], option['e', 'f']);
new Screen(situation['four'], option['g', 'h']);
new Screen(situation['five'], option['i', 'j']);
new Screen(situation['six'], option['k', 'l']);

//render function
function render(i) {
  setSit.textContent = allScreens[i].situation;

  var buttonEl = document.createElement('button');
  buttonEl.textContent = 'a';
  buttonEl.setAttribute('id', 'choice1');
  choices.appendChild(buttonEl);

  var buttonEl = document.createElement('button');
  buttonEl.textContent = 'b';
  buttonEl.setAttribute('id', 'choice2');
  choices.appendChild(buttonEl);
}

render(1);

//clear screen
function clear(){
  choices.innerHTML = '';
  setSit.innerHTML = '';
}

//Event listener/handling for click to move to next screen<commit_msg>Approached/corrected array for situation, array for the options that go with the situations, global vars, instances, and began work on render function.<commit_after>var allScreens = [];

//array for situation
var situation = ['one', 'two', 'three', 'four', 'five', 'six'];

//array for the options that go with the situations
var action = [['a', 'b'], ['c', 'd'], ['e', 'f'], ['g', 'h'], ['i', 'j'], ['k', 'l']];

//global vars
var setSit = document.getElementById('sit');
var choices = document.getElementById('opts');

function Screen(situation, action) {
  this.situation = situation;
  this.action = action;
  allScreens.push(this);
}

//instances
new Screen(situation['one'], option['a', 'b']);
new Screen(situation['two'], option['c', 'd']);
new Screen(situation['three'], option['e', 'f']);
new Screen(situation['four'], option['g', 'h']);
new Screen(situation['five'], option['i', 'j']);
new Screen(situation['six'], option['k', 'l']);

//render function
function render(i) {
  setSit.textContent = allScreens[i].situation;

  var buttonEl = document.createElement('button');
  buttonActionaEl.textContent = 'a';
  buttonEl.setAttribute('id', 'choice1');
  choices.appendChild(buttonEl);

  var buttonEl = document.createElement('button');
  buttonActionbEl.textContent = 'b';
  buttonEl.setAttribute('id', 'choice2');
  choices.appendChild(buttonEl);
}

render(1);

//clear screen
function clear(){
  choices.innerHTML = '';
  setSit.innerHTML = '';
}

//Event listener/handling for click to move to next screen
{'fraction_non_alphanumeric': 0.20290858725761773, 'fraction_numerical': 0.002077562326869806, 'mean_word_length': 5.595890410958904, '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': '1226563', 'n_tokens_mistral': 933, 'n_tokens_neox': 902, 'n_words': 250}