[Toss-devel-svn] SF.net SVN: toss:[1522] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2011-07-31 22:11:30
|
Revision: 1522
http://toss.svn.sourceforge.net/toss/?rev=1522&view=rev
Author: lukaszkaiser
Date: 2011-07-31 22:11:24 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
Remember time of moves in the db.
Modified Paths:
--------------
trunk/Toss/Server/ReqHandler.ml
trunk/Toss/WebClient/index.html
Modified: trunk/Toss/Server/ReqHandler.ml
===================================================================
--- trunk/Toss/Server/ReqHandler.ml 2011-07-30 17:34:24 UTC (rev 1521)
+++ trunk/Toss/Server/ReqHandler.ml 2011-07-31 22:11:24 UTC (rev 1522)
@@ -509,7 +509,7 @@
let move_play move_tup pid =
let sel_s = game_select_s pid in
let old_res= List.hd (dbtable sel_s "cur_states") in
- let (g, p1, p2, m, old_toss, old_loc, old_info, old_svg) =
+ let (g, p1, p2, m, old_toss, old_loc, old_info, old_time) =
(old_res.(1), old_res.(2), old_res.(3), old_res.(4),
old_res.(5), old_res.(6), old_res.(7), old_res.(8)) in
client_set_game (g);
@@ -527,10 +527,11 @@
cur_upd ("toss='" ^ new_toss ^ "'");
cur_upd ("info='" ^ new_info_db ^ "'");
cur_upd ("loc='" ^ move3 ^ "'");
+ cur_upd ("svg='" ^ string_of_float (Unix.gettimeofday ()) ^ "'");
cur_upd ("move=" ^ (string_of_int ((int_of_string m) + 1)));
DB.insert_table dbFILE "old_states"
"playid, game, player1, player2, move, toss, loc, info, svg"
- [pid; g; p1; p2; m; old_toss; old_loc; del_q old_info; old_svg];
+ [pid; g; p1; p2; m; old_toss; old_loc; del_q old_info; old_time];
new_info in
let suggest player time pid =
let res = List.hd (dbtable (game_select_s pid) "cur_states") in
Modified: trunk/Toss/WebClient/index.html
===================================================================
--- trunk/Toss/WebClient/index.html 2011-07-30 17:34:24 UTC (rev 1521)
+++ trunk/Toss/WebClient/index.html 2011-07-31 22:11:24 UTC (rev 1522)
@@ -177,6 +177,7 @@
<div id="news">
<h3>News</h3>
<ul id="welcome-list-news" class="welcome-list">
+<li><b>31/07/11</b> Store date and time of moves in games</li>
<li><b>30/07/11</b> Corrected opponent lists in the Profile tab</li>
<li><b>03/07/11</b> Added game descriptions viewable when playing</li>
<li><b>30/06/11</b> View previous moves in a play</li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|