Graphical, networked, two-(human)-player Tic-Tac-Toe Create a Tic-Tac-Toe game that allows two human players to play against each other using two networked devices.  

Requirements: 


Network play.
Program must let both players know whose turn it is.
Program must show who won and how (like drawing a line through the three in a row).
Graphical game board displayed for both players.
Player moves inputted "graphically" (point and click, etc...).
Enforce all Tic-Tac-Toe rules.


Preferred:


Any libraries are allowed but smaller libraries are better.
Support as many different platforms/devices as possible.
Make it "pretty".


I would love to invent scoring that would take into account the "Preferred" points, but that appears impossible.  So vote for the code that does the best on the "Preferred" points. 

Scoring:


byte count / vote count
lowest score wins
PHP, work in progress (474 chars / 2 upvotes = 237 score)

It's fully functional except it doesn't have win detection yet.


  


What I really like about this solution is that I only learned PHP about 3 days ago, so the code is probably terrible. :D

t.php, 474 chars (newlines can be removed and are there only for readability):

&lt;style&gt;#d&gt;*{display:block;border:1px solid #000;width:50px;height:50px;float:left;text-align:center}#d{width:160px}&lt;/style&gt;&lt;div id=d&gt;&lt;?php
$f=file("a");$p=$_GET["p"];if($p!="x"&amp;&amp;$p!="o")die();
if(isset($_GET["m"])){$s=$f[0];$s[intval($_GET["m"])]=$p;fwrite(fopen('a','w'),$s.($f[1]=='x'?'o':'x'));echo"&lt;a href='t.php?p=$p'&gt;back&lt;/a&gt;";}
else{$i=0;while($i&lt;9){$s=($p==$f[1]&amp;&amp;$f[0][$i]=='.')?'a':'div';echo"&lt;$s href='t.php?p=$p&amp;m=$i'&gt;".$f[0][$i++]."&lt;/$s&gt;";}echo $f[1]."'s turn";}
?&gt;


reset.php, 57 chars

&lt;?php fwrite(fopen('a','w'),"..........\nx");?&gt;Reset done




It's live on my website. Player X should go to this URL:

http://keyboardfire.com/misc/tictactoegolf/t.php?p=x


And Player O should go here:

http://keyboardfire.com/misc/tictactoegolf/t.php?p=o


(don't worry, I added a check that only lets player "o" or "x" in so that you can't do any fancy XSS stuff :P)

To reset, go here:

http://keyboardfire.com/misc/tictactoegolf/reset.php


Obviously, it's really easy to cheat (moving for the other player, randomly resetting the board, etc.), but it's code golf so it doesn't matter :P