From 2c9828637d1a6df06bfe3fdea79f9a1673c9b764 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 15 May 2015 17:22:59 -0700 Subject: [PATCH] curedly flipped octo frontend --- base/pub/octo/fab/hymn.hook | 2 +- base/pub/octo/src/main.css | 10 +++++----- base/pub/octo/src/main.js | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/base/pub/octo/fab/hymn.hook b/base/pub/octo/fab/hymn.hook index bf7ba4d94..89d4b9cf4 100644 --- a/base/pub/octo/fab/hymn.hook +++ b/base/pub/octo/fab/hymn.hook @@ -7,7 +7,7 @@ ;head ;meta(charset "utf-8"); ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js"); - ;script(type "text/javascript", src "/~~/~/at/base/lib/urb.js"); + ;script(type "text/javascript", src "/~/at/base/lib/urb.js"); ;link(type "text/css", rel "stylesheet", href "/home/pub/octo/src/main.css"); ;title: urbit cit cat eot == diff --git a/base/pub/octo/src/main.css b/base/pub/octo/src/main.css index 8304a1b3e..fd6b6c3c2 100644 --- a/base/pub/octo/src/main.css +++ b/base/pub/octo/src/main.css @@ -37,23 +37,23 @@ .spac[data-index="0-0"], .spac[data-index="1-0"], .spac[data-index="2-0"] { - border-top: 0; + border-left: 0; } .spac[data-index="0-0"], .spac[data-index="0-1"], .spac[data-index="0-2"] { - border-left: 0; + border-top: 0; } .spac[data-index="2-0"], .spac[data-index="2-1"], .spac[data-index="2-2"] { - border-right: 0; + border-bottom: 0; } .spac[data-index="0-2"], .spac[data-index="1-2"], .spac[data-index="2-2"] { - border-bottom: 0; -} \ No newline at end of file + border-right: 0; +} diff --git a/base/pub/octo/src/main.js b/base/pub/octo/src/main.js index b96a5a139..c165bd53a 100644 --- a/base/pub/octo/src/main.js +++ b/base/pub/octo/src/main.js @@ -4,15 +4,16 @@ $(function() { symb = [" ","✕","◯"] draw = function(state) { - space = function(_state,x,y) { - return "
"+symb[_state]+"
" } s = "" x = 0 y = 0 for(i=0;i<9;i++) { - s += space((state.box[i] ? 1 : 0)+(state.boo[i] ? 2 : 0),x,y) + j = [0,3,6,1,4,7,2,5,8][i] // XX math + s += space((state.box[j] ? 1 : 0)+(state.boo[j] ? 2 : 0),y,x) x++ if((i+1)%3 == 0) { y++ @@ -41,4 +42,4 @@ $(function() { function(i) { return Number(i); }) urb.send({mark:'octo-move',data:data}) }) -}) \ No newline at end of file +})