<commit_before>var player = {
    "name": "Ness",
    "face": 3,
    "skin": [217, 183, 31],
    "hair": 0,
    "hairColor": [0, 0, 0],
    "tshirt": 'e',
    "tColor": [255, 0, 0],
    'pColor': [0, 50, 0],
    'hp': 50,
    'mp': 10,
    'maxhp': 50,
    'maxmp': 10,
    'xp': 0,
    'nextLevel': 100,
    'money': 0,
     x: 300,
     y: 200
 };

var command = 'Enter X';
var thingToBeEntered = 'ThingToBeEntered';
var enteredText = '';
var text = document.getElementById('textArea');
var playArea = document.getElementById('playArea'); 
var sumbit = document.getElementById('submitButtonArea');
var textInput = document.getElementById('textInput');

function pickFace() {
  text.innerHTML = 'Pick a face shape:';
  var thingie = '<button onclick="setFaceShape(0)">()</button> '
  thingie += '<button onclick="setFaceShape(1)">( )</button>';
  thingie += '<button onclick="setFaceShape(2)">(&nbsp;&nbsp;)</button>';
  thingie += '<button onclick="setFaceShape(3)">(&nbsp;&nbsp;&nbsp;)</button>';
  thingie += '<button onclick="pickSkin()">OK</button>';
  sumbit.innerHTML = thingie;
}

function submitText() {
  switch(thingToBeEntered) {
    case 'name':
      player.name = enteredText;
      document.getElementById('name').innerHTML = player.name;
      pickFace();
      break;
  }
}



function deleteText() {
  if (enteredText.length > 0) {
    enteredText = enteredText.substr(0,enteredText.length-1);
    text.innerHTML = command + enteredText;
    if (thingToBeEntered == 'name'){
      document.getElementById('name').innerHTML = enteredText;
    }
  }
}

function UConScreenKeyboard() {
  var abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
  var thingie = '';
  for (var i = 0; i < abc.length; i++) {
    abc[i] = abc[i].toUpperCase();
    thingie += '<button onclick="enterLetter(\''+ abc[i] + '\')">' + abc[i] + '</button>' ;
  }
  thingie += '<button onclick="enterLetter(\' \')">_</button>';
  thingie += '<button onclick="LConScreenKeyboard()">A^a</button>';
  thingie += '<button onclick="deleteText()">Del</button>';
  thingie += '<button onclick="submitText()">OK</button>';
  sumbit.innerHTML = thingie;
}

function LConScreenKeyboard() {
  var abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
  var thingie = '';
  for (var i = 0; i < abc.length; i++) {
    thingie += '<button onclick="enterLetter(\''+ abc[i] + '\')">' + abc[i] + '</button>' ;
  }
  thingie += '<button onclick="enterLetter(\' \')">_</button>';
  thingie += '<button onclick="UConScreenKeyboard()">a^A</button>';
  thingie += '<button onclick="deleteText()">Del</button>';
  thingie += '<button onclick="submitText()">OK</button>';
  sumbit.innerHTML = thingie;
}

function enterLetter(l) {
  enteredText += l;
  text.innerHTML = command + enteredText;
  if (thingToBeEntered == 'name'){
    document.getElementById('name').innerHTML = enteredText;
  }
  if (enteredText.length = 1) {
    LConScreenKeyboard();
  }
}

function enterName() {
  command = 'Enter name: ';
  text.innerHTML = command;
  thingToBeEntered = 'name';
  enteredText = '';
  text.innerHTML = command + enteredText;
  document.getElementById('name').innerHTML = enteredText;
  UConScreenKeyboard();
}



function pickSkin() {
     text.innerHTML = 'Pick skin tone:';
     var thingie = '<button class="skin0" onclick="setSkinTone(0)">_</button> ';
     thingie += '<button class="skin1" onclick="setSkinTone(1)">_</button> ';
     thingie += '<button class="skin2" onclick="setSkinTone(2)">_</button> ';
     thingie += '<button class="skin3" onclick="setSkinTone(3)">_</button> ';
     thingie += '<button class="skin4" onclick="setSkinTone(4)">_</button> ';
     thingie += '<button onclick="pickHairColor()">OK</button>';    
     sumbit.innerHTML = thingie;
}

function pickHairColor() {
     text.innerHTML = 'Pick hair color:';
     var thingie = '<button class="hair0" onclick="setHairColor(0)">_</button> ';
     thingie += '<button class="hair1" onclick="setHairColor(1)">_</button> ';
     thingie += '<button class="hair2" onclick="setHairColor(2)">_</button> ';
     thingie += '<button class="hair3" onclick="setHairColor(3)">_</button> ';
     thingie += '<button class="hair4" onclick="setHairColor(4)">_</button> ';
     thingie += '<button class="hair5" onclick="setHairColor(5)">_</button> ';
     thingie += '<button onclick="pickShirt()">OK</button>';    
     sumbit.innerHTML = thingie;
}

function setHairColor(o) {
  switch(o) {
      case 0:
        player.hairColor = [0,0,0];
        break;
      case 1:
        player.hairColor = [59,48,36];
        break;
      case 2:
        player.hairColor = [106,78,66];
        break;
      case 3:
        player.hairColor = [165,107,70];
        break;
      case 4:
        player.hairColor = [181,82,57];
        break;
      case 5:
        player.hairColor = [230,206,168];
        break;
  }
}


function pickShirtColor() {
     text.innerHTML = 'Pick shirt color:';
     var thingie = '<button class="shirt0" onclick="setShirtColor(0)">_</button> ';
     thingie += '<button class="shirt1" onclick="setShirtColor(1)">_</button> ';
     thingie += '<button class="shirt2" onclick="setShirtColor(2)">_</button> ';
     thingie += '<button onclick="pickPantsColor()">OK</button> ';
     sumbit.innerHTML = thingie;
}

function setShirtColor(o) {
  switch(o) {
  case 0:
    player.tColor = [255,0,0];
    break;
  case 1:
    player.tColor = [0,100,0];
    break;
  case 2:
    player.tColor = [0,0,255];
    break;
  }
}


function setPantsColor(o) {
  switch(o) {
  case 0:<commit_msg>Update charCreation.js<commit_after>var player = {
    "name": "Ness",
    "face": 3,
    "skin": [217, 183, 31],
    "hair": 0,
    "hairColor": [0, 0, 0],
    "tshirt": 'e',
    "tColor": [255, 0, 0],
    'pColor': [0, 50, 0],
    'hp': 50,
    'mp': 10,
    'maxhp': 50,
    'maxmp': 10,
    'xp': 0,
    'nextLevel': 100,
    'money': 0,
     x: 300,
     y: 200
 };

var command = 'Enter X';
var thingToBeEntered = 'ThingToBeEntered';
var enteredText = '';
var text = document.getElementById('textArea');
var playArea = document.getElementById('playArea'); 
var sumbit = document.getElementById('submitButtonArea');
var textInput = document.getElementById('textInput');

function pickFace() {
  text.innerHTML = 'Pick a face shape:';
  var thingie = '<button onclick="setFaceShape(0)">()</button> '
  thingie += '<button onclick="setFaceShape(1)">( )</button>';
  thingie += '<button onclick="setFaceShape(2)">(&nbsp;&nbsp;)</button>';
  thingie += '<button onclick="setFaceShape(3)">(&nbsp;&nbsp;&nbsp;)</button>';
  thingie += '<button onclick="pickSkin()">OK</button>';
  sumbit.innerHTML = thingie;
}

function submitText() {
  switch(thingToBeEntered) {
    case 'name':
      player.name = enteredText;
      document.getElementById('name').innerHTML = player.name;
      pickFace();
      break;
  }
}



function deleteText() {
  if (enteredText.length > 0) {
    enteredText = enteredText.substr(0,enteredText.length-1);
    text.innerHTML = command + enteredText;
    if (thingToBeEntered == 'name'){
      document.getElementById('name').innerHTML = enteredText;
    }
  }
}

function UConScreenKeyboard() {
  var abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
  var thingie = '';
  for (var i = 0; i < abc.length; i++) {
    abc[i] = abc[i].toUpperCase();
    thingie += '<button onclick="enterLetter(\''+ abc[i] + '\')">' + abc[i] + '</button>' ;
  }
  thingie += '<button onclick="enterLetter(\' \')">_</button>';
  thingie += '<button onclick="LConScreenKeyboard()">A^a</button>';
  thingie += '<button onclick="deleteText()">Del</button>';
  thingie += '<button onclick="submitText()">OK</button>';
  sumbit.innerHTML = thingie;
}

function LConScreenKeyboard() {
  var abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
  var thingie = '';
  for (var i = 0; i < abc.length; i++) {
    thingie += '<button onclick="enterLetter(\''+ abc[i] + '\')">' + abc[i] + '</button>' ;
  }
  thingie += '<button onclick="enterLetter(\' \')">_</button>';
  thingie += '<button onclick="UConScreenKeyboard()">a^A</button>';
  thingie += '<button onclick="deleteText()">Del</button>';
  thingie += '<button onclick="submitText()">OK</button>';
  sumbit.innerHTML = thingie;
}

function enterLetter(l) {
  enteredText += l;
  text.innerHTML = command + enteredText;
  if (thingToBeEntered == 'name'){
    document.getElementById('name').innerHTML = enteredText;
  }
  if (enteredText.length = 1) {
    LConScreenKeyboard();
  }
}

function enterName() {
  command = 'Enter name: ';
  text.innerHTML = command;
  thingToBeEntered = 'name';
  enteredText = '';
  text.innerHTML = command + enteredText;
  document.getElementById('name').innerHTML = enteredText;
  UConScreenKeyboard();
}



function pickSkin() {
     text.innerHTML = 'Pick skin tone:';
     var thingie = '<button class="skin0" onclick="setSkinTone(0)">_</button> ';
     thingie += '<button class="skin1" onclick="setSkinTone(1)">_</button> ';
     thingie += '<button class="skin2" onclick="setSkinTone(2)">_</button> ';
     thingie += '<button class="skin3" onclick="setSkinTone(3)">_</button> ';
     thingie += '<button class="skin4" onclick="setSkinTone(4)">_</button> ';
     thingie += '<button onclick="pickHairColor()">OK</button>';    
     sumbit.innerHTML = thingie;
}

function pickHairColor() {
     text.innerHTML = 'Pick hair color:';
     var thingie = '<button class="hair0" onclick="setHairColor(0)">_</button> ';
     thingie += '<button class="hair1" onclick="setHairColor(1)">_</button> ';
     thingie += '<button class="hair2" onclick="setHairColor(2)">_</button> ';
     thingie += '<button class="hair3" onclick="setHairColor(3)">_</button> ';
     thingie += '<button class="hair4" onclick="setHairColor(4)">_</button> ';
     thingie += '<button class="hair5" onclick="setHairColor(5)">_</button> ';
     thingie += '<button onclick="pickShirt()">OK</button>';    
     sumbit.innerHTML = thingie;
}

function setHairColor(o) {
  switch(o) {
      case 0:
        player.hairColor = [0,0,0];
        break;
      case 1:
        player.hairColor = [59,48,36];
        break;
      case 2:
        player.hairColor = [106,78,66];
        break;
      case 3:
        player.hairColor = [165,107,70];
        break;
      case 4:
        player.hairColor = [181,82,57];
        break;
      case 5:
        player.hairColor = [230,206,168];
        break;
  }
}


function pickShirtColor() {
     text.innerHTML = 'Pick shirt color:';
     var thingie = '<button class="shirt0" onclick="setShirtColor(0)">_</button> ';
     thingie += '<button class="shirt1" onclick="setShirtColor(1)">_</button> ';
     thingie += '<button class="shirt2" onclick="setShirtColor(2)">_</button> ';
     thingie += '<button class="pants3" onclick="setShirtColor(3)">_</button> ';
     thingie += '<button onclick="pickPantsColor()">OK</button> ';
     sumbit.innerHTML = thingie;
}

function setShirtColor(o) {
  switch(o) {
  case 0:
    player.tColor = [255,0,0];
    break;
  case 1:
    player.tColor = [0,100,0];
    break;
  case 2:
    player.tColor = [0,0,255];
    break;
  case 3:
    player.tColor = [0,0,0];
    break;
  }
}


function setPantsColor(o) {
  switch(o) {
  case 0:
{'fraction_non_alphanumeric': 0.213528082072683, 'fraction_numerical': 0.02556077203964528, 'mean_word_length': 3.8009181969949917, 'pattern_counts': {'":': 14, '<': 137, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4367381', 'n_tokens_mistral': 4252, 'n_tokens_neox': 3997, 'n_words': 791}