From b5f589c323f415bb42ea7069cb4d1a8a2233dd69 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 31 Aug 2022 22:03:07 +0200 Subject: Update I guess - Stuffie --- pages/bitset.php | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'pages/bitset.php') diff --git a/pages/bitset.php b/pages/bitset.php index 11031e2..8c63bc5 100644 --- a/pages/bitset.php +++ b/pages/bitset.php @@ -1,7 +1,7 @@
-

Bitset Calculator

+

Bitset calculator

0
@@ -27,8 +27,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include
0
0
0
-
0
-
0
+
0
+
0
0
0
0
@@ -108,6 +108,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include let magic = parseInt(binString.substring(2 + 16, 5 + 16), 2); let sensitivity = parseInt(binString.substring(5 + 16, 8 + 16), 2); let ageSpells = binString.substring(31 + 16, 32 + 16) !== "0"; + let nonverbal = binString.substring(15, 16) !== "0"; + let lessFrequent = binString.substring(14, 15) !== "0"; document.getElementById("value-0").value = sharedMemory; document.getElementById("value-1").value = little; @@ -125,6 +127,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include document.getElementById("value-13").value = sensitivity; document.getElementById("value-14").value = species3; document.getElementById("value-15").checked = ageSpells; + document.getElementById("value-16").checked = nonverbal; + document.getElementById("value-17").checked = lessFrequent; } } @@ -171,6 +175,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include let species2 = binString.substring(21 + 16, 25 + 16); let species3 = binString.substring(25 + 16, 29 + 16); let food = parseInt(binString.substring(16, 2 + 16), 2); + let nonverbal = binString.substring(15, 16) !== "0"; + let lessFrequent = binString.substring(14, 15) !== "0"; let magic = parseInt(binString.substring(2 + 16, 5 + 16), 2); let sensitivity = parseInt(binString.substring(5 + 16, 8 + 16), 2); @@ -190,6 +196,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include document.getElementById("value-10").checked = plush; document.getElementById("value-14").value = species3; document.getElementById("value-15").checked = ageSpells; + document.getElementById("value-16").checked = nonverbal; + document.getElementById("value-17").checked = lessFrequent; calculateOutput(); @@ -213,6 +221,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include let val13 = document.getElementById("value-13").value; let val14 = document.getElementById("value-14").value; let val15 = document.getElementById("value-15").checked; + let val16 = document.getElementById("value-16").checked; + let val17 = document.getElementById("value-17").checked; let val0bin = parseInt(val0).toString(2); val0bin = val0bin.length === 1 ? "0" + val0bin : val0bin; @@ -241,8 +251,10 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include let val9bin = val9 ? "1" : "0"; let val10bin = val10 ? "1" : "0"; let val15bin = val15 ? "1" : "0"; + let val16bin = val16 ? "1" : "0"; + let val17bin = val17 ? "1" : "0"; - let bin = "0000000000000000" + val11bin + val12bin + val13bin + val0bin + val4bin + val1bin + val5bin + val6bin + val7bin + val8bin + val2bin + val3bin + val14bin + val9bin + val10bin + val15bin; + let bin = "00000000000000" + val17bin + val16bin + val11bin + val12bin + val13bin + val0bin + val4bin + val1bin + val5bin + val6bin + val7bin + val8bin + val2bin + val3bin + val14bin + val9bin + val10bin + val15bin; console.log(bin, parseInt(bin, 2)); @@ -364,7 +376,15 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include +
+
+

-- cgit