|
@@ -3,7 +3,33 @@
|
|
|
<head>
|
|
|
<link href="synrc.css" type="text/css" rel="stylesheet">
|
|
|
</head>
|
|
|
-<body border=0>
|
|
|
+<body>
|
|
|
+
|
|
|
+<script>var transition = {pid: '', port: '8000' };</script>
|
|
|
+<script>
|
|
|
+
|
|
|
+function handle_web_socket(body) {
|
|
|
+ switch (dec(body).value[0][2].value) {
|
|
|
+ case 'okey_game_started': {
|
|
|
+ var a = dec(body).value[0][3][0].value[0][1];
|
|
|
+ console.log("Cards " + a.length);
|
|
|
+ console.log(a[0].value[0][1]);
|
|
|
+ console.log(a[2]);
|
|
|
+ for (var i=1;i<=a.length;i++) {
|
|
|
+ var c = a[i-1].value[0][1];
|
|
|
+ var v = a[i-1].value[0][2];
|
|
|
+ console.log("Card " + c + " " + v);
|
|
|
+ place_card(i,1,c,v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ default: console.log(String(dec(body)));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<body>
|
|
|
+
|
|
|
|
|
|
<script>
|
|
|
|
|
@@ -47,6 +73,8 @@ function loadFile(name, cont, element) {
|
|
|
|
|
|
<p><font color=red style="font-weight:bold;">Please make sure your Vector Editor correctly opens this file!</font></p>
|
|
|
|
|
|
+<div id="history"></div><button id="pluslogin" type="button" data-gapiattached="true">Login</button><label id="nothing"> Google</label><br><br><label id="gosterge">Gosterge: 1 5</label><br><label id="player1"> Albert Einstein </label><select id="h1"></select><br><label id="player2"> Marie Curie </label><select id="h2"></select><br><label id="player3"> Ilya Prigogine </label><select id="h3"></select><br><label id="player4" style="font-weight: bold; color: red;"> Asena Simsek </label><select id="h4"></select><br><br><button id="attach" type="button">Attach</button><button id="join" type="button">Join</button><br><select id="take_src"><option label="Table" value="0">Table</option><option label="Left" value="1">Left</option></select><button id="take" type="button">Take</button><select id="istaka"><option label="1 2" value="1 2">1 2</option><option label="2 6" value="2 6">2 6</option><option label="3 7" value="3 7">3 7</option><option label="1 6" value="1 6">1 6</option><option label="1 8" value="1 8">1 8</option><option label="3 6" value="3 6">3 6</option><option label="2 5" value="2 5">2 5</option><option label="2 8" value="2 8">2 8</option><option label="1 13" value="1 13">1 13</option><option label="2 5" value="2 5">2 5</option><option label="4 3" value="4 3">4 3</option><option label="1 11" value="1 11">1 11</option><option label="1 13" value="1 13">1 13</option><option label="2 8" value="2 8">2 8</option><option label="2 1" value="2 1">2 1</option></select><button id="discard" type="button">Discard</button><button id="reveal" type="button">Reveal</button><br><button id="saw_okey" type="button">I Saw Okey</button><button id="have_8" type="button">8 Tashes</button><button id="pause" type="button">Pause</button><button id="info" type="button">PlayerInfo</button>
|
|
|
+
|
|
|
<h1>Refined Object Names</h1>
|
|
|
|
|
|
<code>
|
|
@@ -191,13 +219,13 @@ function empty_card(x,y) { var slot = document.getElementById("Slot-"+y+","+x);
|
|
|
|
|
|
function svg(html) { return new DOMParser().parseFromString(html, "text/xml").firstChild; }
|
|
|
function rand(lo,hi) { return Math.floor((Math.random()*hi)+lo); }
|
|
|
-function drawCards() { for (var i=1;i<14;i++) { place_card(i,rand(1,2),rand(1,4),rand(1,13)); } }
|
|
|
+function drawCards() { for (var i=1;i<15;i++) { place_card(i,rand(1,2),rand(1,4),rand(1,13)); } }
|
|
|
function reload(file, name) { var slot = document.getElementById(name);
|
|
|
slot.parentNode.replaceChild(svg(localStorage.getItem(file)),slot);}
|
|
|
function scaleScene() {
|
|
|
reload("Kakaranet-7-Refined.svg", "Refined");
|
|
|
- for (var i=1;i<14;i++) { empty_card(i,2); empty_card(i,1);}
|
|
|
- loadFile('templates/Card.svg', drawCards);
|
|
|
+ for (var i=1;i<15;i++) { empty_card(i,2); empty_card(i,1);}
|
|
|
+// loadFile('templates/Card.svg', drawCards);
|
|
|
}
|
|
|
|
|
|
loadFile('Kakaranet-7-Refined.svg', scaleScene);
|
|
@@ -313,6 +341,9 @@ XML елементами, як це є в WPF наприклад. Тут спр
|
|
|
|
|
|
</div>
|
|
|
|
|
|
+<script src='../nitrogen/bullet.js' type='text/javascript' charset='utf-8'></script>
|
|
|
+<script src='../nitrogen/n2o.js' type='text/javascript' charset='utf-8'></script>
|
|
|
+<script src='../nitrogen/bert.js' type='text/javascript' charset='utf-8'></script>
|
|
|
|
|
|
</body>
|
|
|
</html>
|