38,45d37
<
< span::after {
< content:'\000031\0020e3';
< }
<
< span.vertex:not(.nocont)::after {
< content:'\000031\0020e3';
< }
65,68d56
< .face {
< border-radius: 150px;
< }
<
76d63
< var lastsquare=-1;
88,92d74
< var haveclickedvertex=false;
< var vstr=';';
< var score=0, goes=0, sqchoice=0, sqorig='';
< var bpointsx=[];
< var bpointsy=[];
94,95c76
< var inquestions=["",
< "10,22,23,9,70,126,128,139,150,149,93,36,82,138,-82,+25,+37,-138,+95,+37",
---
> var inquestions=["10,22,23,9,70,126,128,139,150,149,93,36,82,138,-82,+25,+37,-138,+95,+37",
106,107c87
< var inwordings=["",
< "Get 2 rectangles to 2 squares by moving 2 matches. Which 2?",
---
> var inwordings=["Get 2 rectangles to 2 squares by moving 2 matches. Which 2?",
118,174d97
<
< var sq=["Is the additive identity.",
< "Is the multiplicative identity.",
< "Is the only even prime.",
< "Is the number of spatial dimensions we live in.",
< "Is the smallest number of colours sufficient to colour all planar maps.",
< "Is the number of Platonic solids.",
< "Is the smallest perfect number.",
< "Is the smallest number of sides of a regular polygon that is not constructible by straightedge and compass.",
< "Is the largest cube in the Fibonacci sequence.",
< "Is the maximum number of cubes that are needed to sum to any positive integer.",
< "Is the base of our number system.",
< "Is the largest known multiplicative persistence.",
< "Is the smallest abundant number.",
< "Is the number of Archimedian solids.",
< "Is the smallest even number n with no solutions to phi(m) = n.",
< "Is the smallest composite number n with the property that there is only one group of order n.",
< "Is the only number of the form xy = yx with x and y being different integers.",
< "Is the number of wallpaper groups.",
< "Is the only positive number that is twice the sum of its digits.",
< "Is the maximum number of 4th powers needed to sum to any number.",
< "Is the number of rooted trees with 6 vertices.",
< "Is the smallest number of distinct squares needed to tile a square.",
< "Is the number of partitions of 8.",
< "Is the smallest number of integer-sided boxes that tile a box so that no two boxes share a common length.",
< "Is the largest number divisible by all numbers less than its square root.",
< "Is the smallest square that can be written as a sum of 2 squares."];
<
< function maybenocont(inv) {
< if (inv.length > 0) { return ' nocont'; } else { return ''; }
< }
<
< function vplus(fb) {
< var xf=eval(fb.split(',')[0]);
< var yf=eval(fb.split(',')[1].split(';')[0]);
< return fb + eval(xf) + ',' + eval(1 + yf) + ';' + eval(1 + xf) + ',' + eval(yf) + ';' + eval(1 + xf) + ',' + eval(1 + yf) + ';' + eval(xf) + ',' + eval(-1 + yf) + ';' + eval(-1 + xf) + ',' + eval(yf) + ';' + eval(-1 + xf) + ',' + eval(-1 + yf) + ';';
< }
<
< function ourmathround(inn) {
< var oinn=Math.floor(Math.floor(eval('' + inn) + 23) / 47);
< //if (('' + inn).indexOf('220.') != -1 || ('' + inn).indexOf('218.') != -1) { alert('inn=' + inn + ' and oinn=' + oinn + ' results in ' + '' + eval(eval('' + oinn) * 5)); }
< //if (vstr != '') { alert(vstr); }
< return '' + eval(eval('' + oinn) * 47);
< }
<
< function picksq() {
< sqchoice=Math.floor(Math.random() * eval(0 - 1 + sq.length)) + 1;
< document.getElementById('qh4').innerHTML=sqorig + ' ... Score: ' + score + '/' + goes + ' ... ' + sq[sqchoice];
< }
<
< function gridinfo(insq) {
< if (insq.indexOf(' in square ') != -1) {
< document.getElementById('qh4').innerHTML+=insq;
< } else {
< document.getElementById('qh4').innerHTML=sqorig + insq;
< }
< }
177,191c100,102
< var zero=1, choice=0;
< if (('' + location.hash).indexOf('blank') == -1 && ('' + location.hash).indexOf('square') == -1 && ('' + location.hash).indexOf('grid') == -1) {
< choice=Math.floor(Math.random() * eval(0 - zero + inquestions.length)) + zero;
< if (document.URL.indexOf('?') == -1 && ('' + location.hash) == '') {
< location.href=document.URL.split('#')[0].split('?')[0] + '?wording=' + encodeURIComponent(inwordings[choice]) + '&question=' + encodeURIComponent(inquestions[choice]);
< }
< } else if (('' + location.hash).indexOf('blank') != -1) {
< zero=0;
< location.href=document.URL.split('#')[0].split('?')[0] + '?wording=' + encodeURIComponent('Vertex Pointing Game') + '&question=%20' + location.hash;
< } else if (('' + location.hash).indexOf('square') != -1) {
< zero=0;
< location.href=document.URL.split('#')[0].split('?')[0] + '?wording=' + encodeURIComponent('Square Pointing Game') + '&question=%20' + location.hash;
< } else if (('' + location.hash).indexOf('grid') != -1) {
< zero=0;
< location.href=document.URL.split('#')[0].split('?')[0] + '?wording=' + encodeURIComponent('Grid Pointing Game') + '&question=%20' + location.hash;
---
> var choice=Math.floor(Math.random() * inquestions.length);
> if (document.URL.indexOf('?') == -1) {
> location.href=document.URL.split('#')[0] + '?wording=' + encodeURIComponent(inwordings[choice]) + '&question=' + encodeURIComponent(inquestions[choice]);
210,249d120
< // Thanks to https://stackoverflow.com/questions/16227300/how-to-draw-bezier-curves-with-native-javascript-code-without-ctx-beziercurveto
< function placebezierpoint(t, p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
< var cX = 3 * (p1x - p0x),
< bX = 3 * (p2x - p1x) - cX,
< aX = p3x - p0x - cX - bX;
<
< var cY = 3 * (p1y - p0y),
< bY = 3 * (p2y - p1y) - cY,
< aY = p3y - p0y - cY - bY;
<
< var x = (aX * Math.pow(t, 3)) + (bX * Math.pow(t, 2)) + (cX * t) + p0x;
< var y = (aY * Math.pow(t, 3)) + (bY * Math.pow(t, 2)) + (cY * t) + p0y;
< //alert('' + x + ' ' + y);
< document.getElementById('hrs').innerHTML+='