2009年12月10日木曜日

time to debug server part

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
Now server is able to send updated position ids to clients.

Out:


Hover: (image is swapped to position after move of row)

2009年12月9日水曜日

Handling Hover

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
I was confused with var/scoping of JavaScript.
Now, my scripts handles hover over move list to swap board images.

2009年12月7日月曜日

API for make_move JSONP

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
This is very first edition.


- How to envoke via JSONP
use "make_move" for callback.
i.e. in jQuery,
$.ajax({
url : "http://api.backgammonbase.com/jsonp",
dataType : "jsonp",
cache : true,
jsonp : "make_move",
... snip ...
});

other parameters:
-- gnubgid
give Poisition ID + Match ID, i.e.
example: "jHPDAQXgPHgBWA:UQkyAQAAAAAA"

-- move text
give moves in text.
example: "bar/21 24/20 8/4 8/4"
use "bar" for bar, not "25" or "b"
use "off" for off. not "0" or "o"

- return values

example:

giving parameters
{
gnubgid: "jHPDAQXgPHgBWA:UQkyAQAAAAAA",
move: "bar/21 24/20 8/4 8/4"
}

U gets
{
status: true,
gnubgid: "jHPDAQXgPHgBWA:UQkyAQAAAAAA"
}

error handling is T.B.D.

2009年12月3日木曜日

Parsing gnubg output with JavaScript

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
Now my library able to parse gnubg text output to produce some HTML with even/odd background coloring.