<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>World Flag Quiz - RJM Programming - November, 2017</title>
<style>
td { width: 12%; height: 25%; border: 1px solid red; text-align: center; font-size: 40px; }
.f1:before { content: '\01f371' }
.f2:before { content: '\01f358' }
.f3:before { content: '\01f359' }
.f4:before { content: '\01f35a' }
.f5:before { content: '\01f35b' }
.f6:before { content: '\01f35c' }
.f7:before { content: '\01f35d' }
.f8:before { content: '\01f360' }
.f9:before { content: '\01f362' }
.f10:before { content: '\01f363' }
.f11:before { content: '\01f364' }
.f12:before { content: '\01f365' }
.f13:before { content: '\01f361' }
.f14:before { content: '\01F366' }
.f15:before { content: '\01F367' }
.f16:before { content: '\01F368' }
.f17:before { content: '\01F369' }
.f18:before { content: '\01F36A' }
.f19:before { content: '\01F382' }
.f0:before { content: '\01F370' }
.tlcorner {
-webkit-border-top-left-radius: 30%;
-moz-border-top-left-radius: 30%;
border-top-left-radius: 30%;
border-bottom: solid 1px yellow;
}
.blcorner {
-webkit-border-bottom-left-radius: 30%;
-moz-border-bottom-left-radius: 30%;
border-bottom-left-radius: 30%;
border-top: solid 1px yellow;
}
.trcorner {
-webkit-border-top-right-radius: 30%;
-moz-border-top-right-radius: 30%;
border-top-right-radius: 30%;
border-bottom: solid 1px yellow;
}
.brcorner {
-webkit-border-bottom-right-radius: 30%;
-moz-border-bottom-right-radius: 30%;
border-bottom-right-radius: 30%;
border-top: solid 1px yellow;
}
.xtlcorner {
-webkit-border-top-left-radius: 15%;
-moz-border-top-left-radius: 15%;
border-top-left-radius: 15%;
}
.xblcorner {
-webkit-border-bottom-left-radius: 15%;
-moz-border-bottom-left-radius: 15%;
border-bottom-left-radius: 15%;
}
.xtrcorner {
-webkit-border-top-right-radius: 15%;
-moz-border-top-right-radius: 15%;
border-top-right-radius: 15%;
}
.xbrcorner {
-webkit-border-bottom-right-radius: 15%;
-moz-border-bottom-right-radius: 15%;
border-bottom-right-radius: 15%;
}
//1674 U+1F371 π± π± π± π± π± π± π± π± π± π± β π± bento box
//1675 U+1F358 π π π π π π π π π π β π rice cracker
//1676 U+1F359 π π π π π π π π π π π π rice ball
//1677 U+1F35A π π π π π π π π π π β π cooked rice
//1678 U+1F35B π π π π π π π π π π β π curry rice
//1679 U+1F35C π π π π π π π π π π π π steaming bowl
//1680 U+1F35D π π π π π π π π π π β π spaghetti
//1681 U+1F360 π π π π π π π π π β β π roasted sweet potato
//1682 U+1F362 π’ π’ π’ π’ π’ π’ π’ π’ π’ π’ β π’ oden
//1683 U+1F363 π£ π£ π£ π£ π£ π£ π£ π£ π£ π£ β π£ sushi
//1684 U+1F364 π€ π€ π€ π€ π€ π€ π€ π€ π€ β β π€ fried shrimp
//1685 U+1F365 π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯ β β π₯ fish cake with swirl
//1686 U+1F361 π‘ π‘ π‘ π‘ π‘ π‘ π‘ π‘ π‘ π‘ β π‘ dango
//1687 U+1F95F π₯ π₯ π₯ π₯ π₯ π₯ β π₯ β β β β β dumpling
//1688 U+1F960 π₯ π₯ π₯ π₯ π₯ π₯ β π₯ β β β β β fortune cookie
//1689 U+1F961
//1690 U+1F366 π¦ π¦ π¦ π¦ π¦ π¦ π¦ π¦ π¦ π¦ β π¦ soft ice cream
//1691 U+1F367 π§ π§ π§ π§ π§ π§ π§ π§ π§ π§ β π§ shaved ice
//1692 U+1F368 π¨ π¨ π¨ π¨ π¨ π¨ π¨ π¨ π¨ β β π¨ ice cream
//1693 U+1F369 π© π© π© π© π© π© π© π© π© β β π© doughnut
//1694 U+1F36A πͺ πͺ πͺ πͺ πͺ πͺ πͺ πͺ πͺ β β πͺ cookie
//1695 U+1F382 π π π π π π π π π π π π birthday cake
//1696 U+1F370 π° π° π° π° π° π° π° π° π° π° π° π° shortcake
</style>
<script type='text/javascript'>
var countrynames=['Andorra','United Arab Emirates','Afghanistan','Antigua and Barbuda','Anguilla','Albania','Armenia','Angola','Antarctica','Argentina','American Samoa','Austria','Australia','Aruba','Γ
land Islands','Azerbaijan','Bosnia and Herzegovina','Barbados','Bangladesh','Belgium','Burkina Faso','Bulgaria','Bahrain','Burundi','Benin','St. BarthΓ©lemy','Bermuda','Brunei','Bolivia','Caribbean Netherlands','Brazil','Bahamas','Bhutan','Bouvet Island','Botswana','Belarus','Belize','Canada','Cocos (Keeling) Islands','Congo - Kinshasa','Central African Republic','Congo - Brazzaville','Switzerland','CΓ΄te dβIvoire','Cook Islands','Chile','Cameroon','China','Colombia','Clipperton Island','Costa Rica','Cuba','Cape Verde','CuraΓ§ao','Christmas Island','Cyprus','Czechia','Germany','Diego Garcia','Djibouti','Denmark','Dominica','Dominican Republic','Algeria','Ceuta and Melilla','Ecuador','Estonia','Egypt','Western Sahara','Eritrea','Spain','Ethiopia','European Union','Finland','Fiji','Falkland Islands','Micronesia','Faroe Islands','France','Gabon','United Kingdom','Grenada','Georgia','French Guiana','Guernsey','Ghana','Gibraltar','Greenland','Gambia','Guinea','Guadeloupe','Equatorial Guinea','Greece','South Georgia and South Sandwich Islands','Guatemala','Guam','Guinea-Bissau','Guyana','Hong Kong SAR China','Heard and McDonald Islands','Honduras','Croatia','Haiti','Hungary','Canary Islands','Indonesia','Ireland','Israel','Isle of Man','India','British Indian Ocean Territory','Iraq','Iran','Iceland','Italy','Jersey','Jamaica','Jordan','Japan','Kenya','Kyrgyzstan','Cambodia','Kiribati','Comoros','St. Kitts and Nevis','North Korea','South Korea','Kuwait','Cayman Islands','Kazakhstan','Laos','Lebanon','St. Lucia','Liechtenstein','Sri Lanka','Liberia','Lesotho','Lithuania','Luxembourg','Latvia','Libya','Morocco','Monaco','Moldova','Montenegro','St. Martin','Madagascar','Marshall Islands','Macedonia','Mali','Myanmar (Burma)','Mongolia','Macau SAR China','Northern Mariana Islands','Martinique','Mauritania','Montserrat','Malta','Mauritius','Maldives','Malawi','Mexico','Malaysia','Mozambique','Namibia','New Caledonia','Niger','Norfolk Island','Nigeria','Nicaragua','Netherlands','Norway','Nepal','Nauru','Niue','New Zealand','Oman','Panama','Peru','French Polynesia','Papua New Guinea','Philippines','Pakistan','Poland','St. Pierre and Miquelon','Pitcairn Islands','Puerto Rico','Palestinian Territories','Portugal','Palau','Paraguay','Qatar','RΓ©union','Romania','Serbia','Russia','Rwanda','Saudi Arabia','Solomon Islands','Seychelles','Sudan','Sweden','Singapore','St. Helena','Slovenia','Svalbard and Jan Mayen','Slovakia','Sierra Leone','San Marino','Senegal','Somalia','Suriname','South Sudan','SΓ£o TomΓ© and PrΓncipe','El Salvador','Sint Maarten','Syria','Swaziland','Tristan da Cunha','Turks and Caicos Islands','Chad','French Southern Territories','Togo','Thailand','Tajikistan','Tokelau','Timor-Leste','Turkmenistan','Tunisia','Tonga','Turkey','Trinidad and Tobago','Tuvalu','Taiwan','Tanzania','Ukraine','Uganda','U.S. Outlying Islands','United Nations','United States','Uruguay','Uzbekistan','Vatican City','St. Vincent and Grenadines','Venezuela','British Virgin Islands','U.S. Virgin Islands','Vietnam','Vanuatu','Wallis and Futuna','Samoa','Kosovo','Yemen','Mayotte','South Africa','Zambia','Zimbabwe'];
var contentbits=[' 01F1E6 01F1E9',' 01F1E6 01F1EA',' 01F1E6 01F1EB',' 01F1E6 01F1EC',' 01F1E6 01F1EE',' 01F1E6 01F1F1',' 01F1E6 01F1F2',' 01F1E6 01F1F4',' 01F1E6 01F1F6',' 01F1E6 01F1F7',' 01F1E6 01F1F8',' 01F1E6 01F1F9',' 01F1E6 01F1FA',' 01F1E6 01F1FC',' 01F1E6 01F1FD',' 01F1E6 01F1FF',' 01F1E7 01F1E6',' 01F1E7 01F1E7',' 01F1E7 01F1E9','',' 01F1E7 01F1EB',' 01F1E7 01F1EC',' 01F1E7 01F1ED',' 01F1E7 01F1EE',' 01F1E7 01F1EF',' 01F1E7 01F1F1',' 01F1E7 01F1F2',' 01F1E7 01F1F3',' 01F1E7 01F1F4',' 01F1E7 01F1F6',' 01F1E7 01F1F7',' 01F1E7 01F1F8',' 01F1E7 01F1F9',' 01F1E7 01F1FB',' 01F1E7 01F1FC',' 01F1E7 01F1FE',' 01F1E7 01F1FF',' 01F1E8 01F1E6',' 01F1E8 01F1E8','',' 01F1E8 01F1EB',' 01F1E8 01F1EC',' 01F1E8 01F1ED',' 01F1E8 01F1EE',' 01F1E8 01F1F0',' 01F1E8 01F1F1',' 01F1E8 01F1F2',' 01F1E8 01F1F3',' 01F1E8 01F1F4',' 01F1E8 01F1F5',' 01F1E8 01F1F7',' 01F1E8 01F1FA',' 01F1E8 01F1FB',' 01F1E8 01F1FC',' 01F1E8 01F1FD',' 01F1E8 01F1FE',' 01F1E8 01F1FF',' 01F1E9 01F1EA',' 01F1E9 01F1EC','',' 01F1E9 01F1F0',' 01F1E9 01F1F2',' 01F1E9 01F1F4',' 01F1E9 01F1FF',' 01F1EA 01F1E6',' 01F1EA 01F1E8',' 01F1EA 01F1EA',' 01F1EA 01F1EC',' 01F1EA 01F1ED',' 01F1EA 01F1F7',' 01F1EA 01F1F8',' 01F1EA 01F1F9',' 01F1EA 01F1FA',' 01F1EB 01F1EE',' 01F1EB 01F1EF',' 01F1EB 01F1F0',' 01F1EB 01F1F2',' 01F1EB 01F1F4',' 01F1EB 01F1F7','',' 01F1EC 01F1E7',' 01F1EC 01F1E9',' 01F1EC 01F1EA',' 01F1EC 01F1EB',' 01F1EC 01F1EC',' 01F1EC 01F1ED',' 01F1EC 01F1EE',' 01F1EC 01F1F1',' 01F1EC 01F1F2',' 01F1EC 01F1F3',' 01F1EC 01F1F5',' 01F1EC 01F1F6',' 01F1EC 01F1F7',' 01F1EC 01F1F8',' 01F1EC 01F1F9',' 01F1EC 01F1FA',' 01F1EC 01F1FC',' 01F1EC 01F1FE',' 01F1ED 01F1F0','',' 01F1ED 01F1F3',' 01F1ED 01F1F7',' 01F1ED 01F1F9',' 01F1ED 01F1FA',' 01F1EE 01F1E8',' 01F1EE 01F1E9',' 01F1EE 01F1EA',' 01F1EE 01F1F1',' 01F1EE 01F1F2',' 01F1EE 01F1F3',' 01F1EE 01F1F4',' 01F1EE 01F1F6',' 01F1EE 01F1F7',' 01F1EE 01F1F8',' 01F1EE 01F1F9',' 01F1EF 01F1EA',' 01F1EF 01F1F2',' 01F1EF 01F1F4',' 01F1EF 01F1F5','',' 01F1F0 01F1EC',' 01F1F0 01F1ED',' 01F1F0 01F1EE',' 01F1F0 01F1F2',' 01F1F0 01F1F3',' 01F1F0 01F1F5',' 01F1F0 01F1F7',' 01F1F0 01F1FC',' 01F1F0 01F1FE',' 01F1F0 01F1FF',' 01F1F1 01F1E6',' 01F1F1 01F1E7',' 01F1F1 01F1E8',' 01F1F1 01F1EE',' 01F1F1 01F1F0',' 01F1F1 01F1F7',' 01F1F1 01F1F8',' 01F1F1 01F1F9',' 01F1F1 01F1FA','',' 01F1F1 01F1FE',' 01F1F2 01F1E6',' 01F1F2 01F1E8',' 01F1F2 01F1E9',' 01F1F2 01F1EA',' 01F1F2 01F1EB',' 01F1F2 01F1EC',' 01F1F2 01F1ED',' 01F1F2 01F1F0',' 01F1F2 01F1F1',' 01F1F2 01F1F2',' 01F1F2 01F1F3',' 01F1F2 01F1F4',' 01F1F2 01F1F5',' 01F1F2 01F1F6',' 01F1F2 01F1F7',' 01F1F2 01F1F8',' 01F1F2 01F1F9',' 01F1F2 01F1FA','',' 01F1F2 01F1FC',' 01F1F2 01F1FD',' 01F1F2 01F1FE',' 01F1F2 01F1FF',' 01F1F3 01F1E6',' 01F1F3 01F1E8',' 01F1F3 01F1EA',' 01F1F3 01F1EB',' 01F1F3 01F1EC',' 01F1F3 01F1EE',' 01F1F3 01F1F1',' 01F1F3 01F1F4',' 01F1F3 01F1F5',' 01F1F3 01F1F7',' 01F1F3 01F1FA',' 01F1F3 01F1FF',' 01F1F4 01F1F2',' 01F1F5 01F1E6',' 01F1F5 01F1EA','',' 01F1F5 01F1EC',' 01F1F5 01F1ED',' 01F1F5 01F1F0',' 01F1F5 01F1F1',' 01F1F5 01F1F2',' 01F1F5 01F1F3',' 01F1F5 01F1F7',' 01F1F5 01F1F8',' 01F1F5 01F1F9',' 01F1F5 01F1FC',' 01F1F5 01F1FE',' 01F1F6 01F1E6',' 01F1F7 01F1EA',' 01F1F7 01F1F4',' 01F1F7 01F1F8',' 01F1F7 01F1FA',' 01F1F7 01F1FC',' 01F1F8 01F1E6',' 01F1F8 01F1E7','',' 01F1F8 01F1E9',' 01F1F8 01F1EA',' 01F1F8 01F1EC',' 01F1F8 01F1ED',' 01F1F8 01F1EE',' 01F1F8 01F1EF',' 01F1F8 01F1F0',' 01F1F8 01F1F1',' 01F1F8 01F1F2',' 01F1F8 01F1F3',' 01F1F8 01F1F4',' 01F1F8 01F1F7',' 01F1F8 01F1F8',' 01F1F8 01F1F9',' 01F1F8 01F1FB',' 01F1F8 01F1FD',' 01F1F8 01F1FE',' 01F1F8 01F1FF',' 01F1F9 01F1E6','',' 01F1F9 01F1E9',' 01F1F9 01F1EB',' 01F1F9 01F1EC',' 01F1F9 01F1ED',' 01F1F9 01F1EF',' 01F1F9 01F1F0',' 01F1F9 01F1F1',' 01F1F9 01F1F2',' 01F1F9 01F1F3',' 01F1F9 01F1F4',' 01F1F9 01F1F7',' 01F1F9 01F1F9',' 01F1F9 01F1FB',' 01F1F9 01F1FC',' 01F1F9 01F1FF',' 01F1FA 01F1E6',' 01F1FA 01F1EC',' 01F1FA 01F1F2',' 01F1FA 01F1F3','',' 01F1FA 01F1FE',' 01F1FA 01F1FF',' 01F1FB 01F1E6',' 01F1FB 01F1E8',' 01F1FB 01F1EA',' 01F1FB 01F1EC',' 01F1FB 01F1EE',' 01F1FB 01F1F3',' 01F1FB 01F1FA',' 01F1FC 01F1EB',' 01F1FC 01F1F8',' 01F1FD 01F1F0',' 01F1FE 01F1EA',' 01F1FE 01F1F9',' 01F1FF 01F1E6',' 01F1FF 01F1F2',' 01F1FF 01F1FC',''];
var foods=[], ifood=0;
var huh=[0,1,2,3,4,5,6,7,9,11,19,18,17,16,15,14,13,12,10,8];
var huhx=[0,1,2,3,4,5,6,7,10,12,20,19,18,17,16,15,14,13,11,8];
var back=[];
var scores=[(location.search.split('score1=')[1] ? eval(location.search.split('score1=')[1].split('&')[0]) : 0),(location.search.split('score2=')[1] ? eval(location.search.split('score2=')[1].split('&')[0]) : 0),(location.search.split('score3=')[1] ? eval(location.search.split('score3=')[1].split('&')[0]) : 0),(location.search.split('score4=')[1] ? eval(location.search.split('score4=')[1].split('&')[0]) : 0)];
var goes=[(location.search.split('goes1=')[1] ? eval(location.search.split('goes1=')[1].split('&')[0]) : 0),(location.search.split('goes2=')[1] ? eval(location.search.split('goes2=')[1].split('&')[0]) : 0),(location.search.split('goes3=')[1] ? eval(location.search.split('goes3=')[1].split('&')[0]) : 0),(location.search.split('goes4=')[1] ? eval(location.search.split('goes4=')[1].split('&')[0]) : 0)];
var times=[0,0,0,0];
var thisplayer=0;
var menu=['shortcake;5.00','bento box;8.00','rice cracker;0.80','rice ball;1.20','cooked rice;2.50','curry rice;3.00','steaming bowl;4.00','spaghetti;6.00','roasted sweet potato;0.80','oden;2.70','sushi;2.00','fried shrimp;2.10','fish cake with swirl;0.60','dango;2.85','soft ice cream;0.55','shaved ice;0.30','ice cream;0.90','doughnut;0.58','cookie;0.35','birthday cake;3.40'];
var lasturl=["","","",""];
var lastscnt=[1,1,1,1],ii=0;
function placefood() {
var jj=0, ioffset=0, ie=null;
ii=0;
var tds=document.getElementsByTagName('td');
if (foods.length == 0) {
document.getElementById('pyr1').value=location.search.split('name1=')[1] ? decodeURIComponent(location.search.split('name1=')[1]).split('&')[0] : 'Player1';
document.getElementById('pyr2').value=location.search.split('name2=')[1] ? decodeURIComponent(location.search.split('name2=')[1]).split('&')[0] : 'Player2';
document.getElementById('pyr3').value=location.search.split('name3=')[1] ? decodeURIComponent(location.search.split('name3=')[1]).split('&')[0] : 'Player3';
document.getElementById('pyr4').value=location.search.split('name4=')[1] ? decodeURIComponent(location.search.split('name4=')[1]).split('&')[0] : 'Player4';
document.getElementById('score0').innerHTML='Score: ' + scores[0] + '/' + goes[0];
document.getElementById('score1').innerHTML='Score: ' + scores[1] + '/' + goes[1];
document.getElementById('score2').innerHTML='Score: ' + scores[2] + '/' + goes[2];
document.getElementById('score3').innerHTML='Score: ' + scores[3] + '/' + goes[3];
for (ii=0; ii<tds.length; ii++) {
if (('' + tds[ii].id) != 'midbit') {
foods.push('f' + Math.floor(Math.random() * 19));
back.push(0);
}
}
//alert(foods.length + ' ' + menu.length + ' ' + tds.length);
jj=0;
ioffset=0;
for (ii=0; ii<tds.length; ii++) {
if (('' + tds[ii].id) != 'midbit') {
//foods[huh[jj]]=('f' + Math.floor(Math.random() * 19));
//document.title=' huhx[' + jj + ']';
tds[eval(huhx[jj])].className+=' ' + foods[huh[jj]];
tds[eval(huhx[jj])].title=menu[eval(foods[huh[jj]].replace('f',''))].split(';')[0];
if (menu[eval(foods[huh[jj]].replace('f',''))].split(';').length > 1) {
tds[eval(huhx[jj])].alt=tds[eval(huhx[jj])].title + ';' + menu[eval(foods[huh[jj]].replace('f',''))].split(';')[1];
tds[eval(huhx[jj])].title='';
}
jj++;
} else {
ioffset=1;
}
}
ifood=1;
} else {
jj=0;
ioffset=0;
for (ii=0; ii<tds.length; ii++) {
if (('' + tds[ii].id) != 'midbit') {
if (tds[eval(huhx[jj])].className.indexOf(' nothing') == -1 || 1 == 1) {
tds[eval(huhx[jj])].className=tds[eval(huhx[jj])].className.split(' f')[0] + ' ' + foods[eval(eval(huh[eval((jj + ifood) % huh.length)]))];
back[eval(huhx[jj])]=eval(eval(huh[eval((jj + ifood) % huh.length)]));
try {
tds[eval(huhx[jj])].title=menu[eval(foods[eval(eval(huh[eval((jj + ifood) % huh.length)]))].replace('f',''))].split(';')[0];
if (menu[eval(foods[eval(eval(huh[eval((jj + ifood) % huh.length)]))].replace('f',''))].split(';').length > 1) {
tds[eval(huhx[jj])].alt=tds[eval(huhx[jj])].title + ';' + menu[eval(foods[eval(eval(huh[eval((jj + ifood) % huh.length)]))].replace('f',''))].split(';')[1];
tds[eval(huhx[jj])].title='';
}
} catch(ie) {
}
}
jj++;
} else {
ioffset=1;
}
}
ifood++;
}
setTimeout(placefood, 2000);
}
function onc(otd) {
var ii=0, jj=0, ioffset=0, thisc='';
//document.title=otd.className;
var thisplayerz=thisplayer;
var otdtitle=otd.alt.split(';')[0];
var otdalt=otd.alt;
if (otd.alt.indexOf(';') != -1) otdalt=otd.alt.split(';')[1];
var otdclassName=otd.className;
var tds=document.getElementsByTagName('td');
for (ii=0; ii<tds.length; ii++) {
if (tds[ii] === otd) {
jj=ii;
}
}
var vsf=otdclassName.split(' f');
if (vsf.length > 1) thisc='f' + otdclassName.split(' f')[1];
if (otdclassName.indexOf(' nothing') == -1 && 1 == 2) {
otd.className=vsf[0] + ' nothing'; // + ' ' + otd.className.replace(vsf[0] + ' ','');
//alert(otd.className);
} else if (foods[huh[jj]] != '') {
//foods[huhx[jj]]='';
//document.title='' + jj + ' ' + thisc + ' vs ' + foods[eval(eval(huh[eval((eval(jj + ifood) + 1) % huh.length)]))] + ' Vs ' + + foods[eval(eval(huh[eval((eval(jj + ifood) + 0) % huh.length)]))] + ' VS ' + + foods[eval(eval(huh[eval((eval(jj + ifood) - 1) % huh.length)]))];
//foods[eval(eval(huh[eval((jj + ifood) % huh.length)]))]='';
goes[thisplayerz]++;
if (foods[back[jj]] != '') {
var scnt=1;
var localiurl="localized_currency.html";
var localidelim="?";
if (('' + otdalt) == '') {
scores[thisplayerz]+=0; //=price[];
} else {
//document.title=Math.floor(eval(otd.alt) * 100.0);
var ip=prompt(document.getElementById('pyr' + eval(1 + thisplayerz)).value + ', please enter the Country of the Flag you clicked.','');
if (ip == null) ip='';
if (ip.length > 1 && (ip.toLowerCase() == otdtitle.toLowerCase() || otdtitle.indexOf(ip) != -1)) {
scores[thisplayerz]+=Math.floor(eval(otdalt) * 1); //00.0); //=price[];
document.getElementById('score' + thisplayerz).innerHTML='<a style="cursor:pointer;text-decoration:underline;" onclick="showeats(' + thisplayerz + ');">Score</a>: ' + scores[thisplayerz] + '/' + goes[thisplayerz];
//alert(scores[thisplayerz]);
if (document.getElementById('order' + thisplayerz).innerHTML == '') {
document.getElementById('order' + thisplayerz).innerHTML='<br><span id=sc' + thisplayerz + 'nt' + scnt + '>' + (otdalt + '00').substring(0,4) + ' ' + otdtitle + '</span><br>';
localiurl+=localidelim + 'called' + scnt + '=' + encodeURIComponent('sc' + thisplayerz + 'nt' + scnt + '`' + otdalt + ' ' + otdtitle);
localidelim='&';
scnt++;
} else {
if (scnt == 1) {
localiurl=lasturl[thisplayerz];
localidelim='&';
scnt=lastscnt[thisplayerz];
}
document.getElementById('order' + thisplayerz).innerHTML+='<span id=sc' + thisplayerz + 'nt' + scnt + '>' + (otdalt + '00').substring(0,4) + ' ' + otdtitle + '</span><br>';
localiurl+=localidelim + 'called' + scnt + '=' + encodeURIComponent('sc' + thisplayerz + 'nt' + scnt + '`' + otdalt + ' ' + otdtitle);
localidelim='&';
scnt++;
}
} else {
scores[thisplayerz]+=0; //=price[];
document.getElementById('score' + thisplayerz).innerHTML='<a style="cursor:pointer;text-decoration:underline;" onclick="showeats(' + thisplayerz + ');">Score</a>: ' + scores[thisplayerz] + '/' + goes[thisplayerz] + ' ... answer was ' + otdtitle;
}
}
if (localiurl.indexOf('?') != -1) {
document.getElementById('locali').src=localiurl;
lasturl[thisplayerz]=localiurl;
lastscnt[thisplayerz]=scnt;
}
if (times[thisplayerz] != 0) times[thisplayerz]=1;
}
if (document.getElementById('score' + thisplayerz).innerHTML.indexOf(' ... answer ') == -1) document.getElementById('score' + thisplayerz).innerHTML='<a style="cursor:pointer;text-decoration:underline;" onclick="showeats(' + thisplayerz + ');">Score</a>: ' + scores[thisplayerz] + '/' + goes[thisplayerz];
foods[back[jj]]='';
}
}
function showeats(weis) {
document.getElementById('order' + weis).style.display='inline';
}
function timeit() {
if (times[thisplayer] == 1) {
times[thisplayer]=0;
thisplayer=eval(eval(1 + thisplayer) % 4);
times[thisplayer]=6;
} else {
times[thisplayer]--;
}
for (var jk=0; jk<4; jk++) {
if (jk == thisplayer) {
document.getElementById('score' + jk).style.fontWeight='bold';
} else {
document.getElementById('score' + jk).style.fontWeight='normal';
}
}
setTimeout(timeit,1000);
}
function resume() {
location.href='./flagquiz.html?score1=' + scores[0] + '&goes1=' + goes[0] + '&score2=' + scores[1] + '&goes2=' + goes[1] + '&score3=' + scores[2] + '&goes3=' + goes[2] + '&score4=' + scores[3] + '&goes4=' + goes[3] + '&name1=' + encodeURIComponent(document.getElementById('pyr1').value) + '&name2=' + encodeURIComponent(document.getElementById('pyr2').value) + '&name3=' + encodeURIComponent(document.getElementById('pyr3').value) + '&name4=' + encodeURIComponent(document.getElementById('pyr4').value);
}
</script>
</head>
<body style='background-color: white;' onload='thisplayer=Math.floor(Math.random() * 4); times[thisplayer]=6; setTimeout(timeit,1000); placefood();'>
<div style='float:left;'><input id='pyr1' type='text' value='Player1'></input> <span style='display:none;color:blue;' id='order0'></span> <span id='score0'>Score: 0/0</span><br><br></div><div style='float:right;'><input id='pyr2' type='text' value='Player2'></input> <span style='display:none;color:blue;' id='order1'></span> <span id='score1'>Score: 0/0</span><br><br></div>
<div style='background-color: white;'>
<table cellspacing=0 cellpadding=0 style='width:100%;height:60vh; background-color: yellow;'>
<tr style='width:100%;'><td onclick='onc(this);' class='tlcorner'></td><td onclick='onc(this);' style='border-bottom:1px solid yellow;'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell' style='border-bottom:1px solid yellow;'></td><td onclick='onc(this);' class='trcorner'></td></tr>
<tr style='width:100%;'><td onclick='onc(this);' class='cell' style='border-top:1px solid yellow;'><hr style='border-color:red; margin-top: -75px;'></hr></td><td id='midbit' style=' background-color:white; ' colspan=6 rowspan=2 class=' xtlcorner xblcorner xtrcorner xbrcorner '><div style='width:100%;text-align:center;'>World Flag <a style='cursor:pointer;text-decoration:underline;' onclick='resume();' title='Another set of flags and continue the scoring'>Quiz</a> - RJM Programming - November, 2017</div></td><td onclick='onc(this);' style='border-top:1px solid yellow;'><hr style='border-color:red; margin-top:-75px;'></hr></td></tr>
<tr style='width:100%;'><td onclick='onc(this);' class='cell' style='border-bottom:1px solid yellow;'><hr style='border-color:red; margin-top: 40px;'></hr></td><td onclick='onc(this);' style='border-bottom:1px solid yellow;'><hr style='border-color:red; margin-top: 40px;'></hr></td></tr>
<tr style='width:100%;'><td onclick='onc(this);' class='blcorner'></td><td onclick='onc(this);' style='border-top:1px solid yellow;'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell'></td><td onclick='onc(this);' class='cell' style='border-top:1px solid yellow;'></td><td onclick='onc(this);' class='brcorner'></td></tr>
</table>
<div style='float:left;'><br><br><input id='pyr3' type='text' value='Player3'></input> <span style='display:none;color:blue;' id='order2'></span> <span id='score2'>Score: 0/0</span></div><div style='float:right;'><br><br><input id='pyr4' type='text' value='Player4'></input> <span style='display:none;color:blue;' id='order3'></span> <span id='score3'>Score: 0/0</span></div>
</div>
<!--iframe src='localized_currency.html' style='display:none;' id='locali'></iframe-->
<script type="text/javascript">
var foodtocountry=[], countrytofood=',', astyle=' <style> </style> ', aguess='';
for (ii=0; ii<20; ii++) {
if (foodtocountry.length == 0) {
foodtocountry.push(Math.floor(Math.random() * countrynames.length));
astyle=astyle.replace("</style>", " .f" + ii + ":before { content: '" + contentbits[eval('' + foodtocountry[0])].replace(' ','\\'.substring(0,1)).replace(' ','\\'.substring(0,1)) + "' } </style>");
countrytofood+='' + foodtocountry[0] + ',';
} else {
aguess='';
while (countrytofood.indexOf(',' + aguess + ',') != -1 || aguess == '') {
aguess=Math.floor(Math.random() * countrynames.length);
}
foodtocountry.push(eval(aguess));
astyle=astyle.replace("</style>", " .f" + ii + ":before { content: '" + contentbits[eval(aguess)].replace(' ','\\'.substring(0,1)).replace(' ','\\'.substring(0,1)) + "' } </style>");
countrytofood+='' + aguess + ',';
}
}
document.write(astyle + " <sc" + "ript type='text/javascript'> for (var iy=0; iy" + String.fromCharCode(60) + "menu.length; iy++) { menu[iy]=countrynames[foodtocountry[iy]] + ';1.00'; } </sc" + "ript>");
</script>
</body>
</html>