[Toss-devel-svn] SF.net SVN: toss:[1696] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
From: <luk...@us...> - 2012-03-21 20:03:26
|
Revision: 1696 http://toss.svn.sourceforge.net/toss/?rev=1696&view=rev Author: lukaszkaiser Date: 2012-03-21 20:03:14 +0000 (Wed, 21 Mar 2012) Log Message: ----------- Client and website corrections. Modified Paths: -------------- trunk/Toss/Client/Main.js trunk/Toss/Client/Play.js trunk/Toss/Client/Style.css trunk/Toss/Client/index.html trunk/Toss/www/develop.xml trunk/Toss/www/docs.xml trunk/Toss/www/ideas.xml trunk/Toss/www/index.xml Modified: trunk/Toss/Client/Main.js =================================================================== --- trunk/Toss/Client/Main.js 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/Client/Main.js 2012-03-21 20:03:14 UTC (rev 1696) @@ -35,7 +35,9 @@ } nameDISP = disp_name; +var BLOCKED = false function handle_elem_click (elem) { + if (BLOCKED) return; PLAY.handle_click (elem); } @@ -108,6 +110,8 @@ document.getElementById ("game-title-move").style.display = "inline"; document.getElementById ("game-desc-controls").style.display = "block"; document.getElementById ("suggestions-toggle").style.display = "inline"; + document.getElementById ("new_game_me_bottom").style.display = "inline"; + document.getElementById ("new_game_opp_bottom").style.display= "inline"; document.getElementById ("game-disp").style.display = "block"; document.getElementById ("plays").style.left = "30em"; var p = new Play (GAME_NAME, [0,1], [UNAME, opp_uid], 1, 0, @@ -197,8 +201,10 @@ var DONE_MOVES_MARKER = {} var MOVE_INDEX = 0 function suggest_move_async (time, f) { + BLOCKED = true; show_moving_msg (time); var fm = function (m) { + BLOCKED = false; document.getElementById("working").style.display = "none"; document.getElementById("working").innerHTML = "Working..."; console.log ("Algorithm performed " +m.comp_iters +" iterations."); Modified: trunk/Toss/Client/Play.js =================================================================== --- trunk/Toss/Client/Play.js 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/Client/Play.js 2012-03-21 20:03:14 UTC (rev 1696) @@ -82,8 +82,6 @@ // Handler for clicks on elements in a play. function play_handle_click (elem) { - if (typeof CONN != 'undefined' && ASYNC_ALL_REQ_PENDING != 0) - { return; } var moves = this.cur_state.get_moves (elem, this.LAST_CLICKED_ELEM); if (moves.length == 0) { this.LAST_CLICKED_ELEM = ""; Modified: trunk/Toss/Client/Style.css =================================================================== --- trunk/Toss/Client/Style.css 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/Client/Style.css 2012-03-21 20:03:14 UTC (rev 1696) @@ -268,26 +268,50 @@ top: 2px; } +#speedtab { + position: absolute; + right: 5em; + top: .6em; + height: 1.5em; + background-color: #400827; + border-color: #fff1d4; + border-style: solid; + border-width: 0px 2px 0px 2px; + /*border-radius: 6px 6px 0px 0px; */ + padding-top: 0.1em; + padding-bottom: 0.2em; + padding-left: 0.2em; + padding-right: 0.2em; + border-radius: 0px; + -moz-border-radius: 0px; + /*font-size: 0.9em; + -moz-border-radius: 6px 6px 0px 0px; */ +} + #speed { position: relative; - top: -0.1em; font-weight: bold; font-family: Verdana, 'TeXGyreHerosRegular', sans; - font-size: 0.8em; color: #fff1d4; - background-color: #777777; + background: none; + /* background-color: #400827 */ + font-size: 1em; padding: 0px; margin: 0px; border-color: #fff1d4; - border-radius: 4px; - -moz-border-radius: 4px; + /*border-radius: 4px; + -moz-border-radius: 4px;*/ border-width: 0px; } +#speed:hover { + cursor: pointer; +} + .speed_val { color: #fff1d4; font-weight: bold; - background-color: #666666; + background-color: #400827; border-width: 0px; } @@ -479,19 +503,20 @@ #toprighttab { display: none; position: absolute; - right: 1em; - top: 1.3em; - background-color: #260314; + right: .5em; + top: .6em; + height: 1.5em; + /*background-color: #260314;*/ border-color: #fff1d4; border-style: solid; - border-width: 2px 2px 0px 2px; - border-radius: 6px 6px 0px 0px; + border-width: 0px; + /*border-radius: 6px 6px 0px 0px; */ padding-top: 0.1em; padding-bottom: 0.2em; padding-left: 0.2em; padding-right: 0.2em; - font-size: 0.9em; - -moz-border-radius: 6px 6px 0px 0px; + /*font-size: 0.9em; + -moz-border-radius: 6px 6px 0px 0px; */ } #bottom { @@ -527,11 +552,11 @@ #bottomright { position: absolute; top: 0em; - right: 1em; + right: 0em; margin-right: 0em; } -#toss-link, .contact, #suggestions-toggle { +#toss-link, #suggestions-toggle, #new_game_me_bottom, #new_game_opp_bottom { position: relative; top: -1px; padding-left: 0.5em; @@ -540,21 +565,27 @@ font-size: 1em; font-weight: bold; font-family: Verdana; - background-color: #260314; + background-color: #400827; /* #260314 */ border-color: #fff1d4; border-style: solid; - border-width: 0px 2px 2px 2px; + border-width: 0px 0px 0px 2px; + /*border-width: 0px 2px 2px 2px; border-radius: 0px 0px 6px 6px; - -moz-border-radius: 0px 0px 6px 6px; + -moz-border-radius: 0px 0px 6px 6px;*/ } -#suggestions-toggle { +#toss-link { + border-width: 0px; +} + +#suggestions-toggle, #new_game_me_bottom, #new_game_opp_bottom { margin: 0px; padding-top: 0px; padding-bottom: 0px; + display: none; } -#suggestions-toggle:hover { +#suggestions-toggle:hover,#new_game_me_bottom:hover,#new_game_opp_bottom:hover { color: #ffffff; text-decoration: underline; cursor: pointer; Modified: trunk/Toss/Client/index.html =================================================================== --- trunk/Toss/Client/index.html 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/Client/index.html 2012-03-21 20:03:14 UTC (rev 1696) @@ -33,6 +33,21 @@ <a href="http://itunes.apple.com/us/app/tplay/id438620686" ><img style="height: 24px; width: 69px;" src="img/appstore-small.png" /></a> </span> + + <span id="speedtab" style="display: none;"> + Speed: <select id="speed"> + <option class="speed_val" value="1">1s</option> + <option class="speed_val" value="2">2s</option> + <option class="speed_val" value="3">3s</option> + <option class="speed_val" value="4">4s</option> + <option class="speed_val" value="5">5s</option> + <option class="speed_val" value="10">10s</option> + <option class="speed_val" value="15">15s</option> + <option class="speed_val" value="30">30s</option> + <option class="speed_val" value="60">60s</option> + </select> + </span> + <span id="toprighttab"><a id="backlink-games" href="index.html">Games</a></span> </div> @@ -384,19 +399,12 @@ onclick="toggle_suggestions()"> Ask Before Move </button> - <span class="contact" id="speedtab" style="display: none;"> - Speed: <select id="speed"> - <option class="speed_val" value="1">1s</option> - <option class="speed_val" value="2">2s</option> - <option class="speed_val" value="3">3s</option> - <option class="speed_val" value="4">4s</option> - <option class="speed_val" value="5">5s</option> - <option class="speed_val" value="10">10s</option> - <option class="speed_val" value="15">15s</option> - <option class="speed_val" value="30">30s</option> - <option class="speed_val" value="60">60s</option> - </select> - </span> + <button id="new_game_opp_bottom" onclick="play_anew(false)"> + New Game (Opponent Starts) + </button> + <button id="new_game_me_bottom" onclick="play_anew(true)"> + New Game (You Start) + </button> </div> </div> Modified: trunk/Toss/www/develop.xml =================================================================== --- trunk/Toss/www/develop.xml 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/www/develop.xml 2012-03-21 20:03:14 UTC (rev 1696) @@ -21,7 +21,10 @@ <item>If you want to develop Toss on <a href="http://www.ubuntu.com/">Ubuntu</a>, here is a command with a list of packages to install.<br/> - <em>sudo apt-get install menhir libjs-of-ocaml-dev phantomjs</em> + <em>sudo apt-get install menhir liblwt-ocaml-dev + phantomjs</em><br/> Then download + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> + js_of_ocaml</a>, unpack it and do <em>make; sudo make install</em> </item> <item>To develop Toss on <a href="http://www.apple.com/macosx/">MacOSX</a>, @@ -29,8 +32,8 @@ <a href="http://www.macports.org/">MacPorts</a> (Xcode required) and do the following.<br/> <em>sudo port install ocaml ocaml-menhir ocaml-lwt - phantomjs</em><br/> download - <a href="http://ocsigen.org/download/js_of_ocaml-1.0.9.tar.gz"> + phantomjs</em><br/> Then download + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> js_of_ocaml</a>, unpack it and do <em>make; sudo make install</em> </item> <item>This command will checkout the @@ -53,7 +56,11 @@ <a href="http://www.ubuntu.com/">Ubuntu</a> kompilieren möchte, braucht man Pakete, die mit folgender Zeile installiert werden können.<br/> - <em>sudo apt-get install menhir libjs-of-ocaml-dev phantomjs</em> + <em>sudo apt-get install menhir liblwt-ocaml-dev + phantomjs</em><br/> Dann muss man + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> + js_of_ocaml</a> runterladen, auspacken und dort + <em>make; sudo make install</em> ausführen </item> <item>Um Toss unter <a href="http://www.apple.com/macosx/">MacOSX</a> @@ -61,8 +68,8 @@ <a href="http://www.macports.org/">MacPorts</a> (Xcode nötig). Mit MacPorts muss man folgendes installieren.<br/> <em>sudo port install ocaml ocaml-menhir ocaml-lwt - phantomjs</em><br/> dann - <a href="http://ocsigen.org/download/js_of_ocaml-1.0.9.tar.gz"> + phantomjs</em><br/> Dann muss man + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> js_of_ocaml</a> runterladen, auspacken und dort <em>make; sudo make install</em> ausführen </item> @@ -82,19 +89,21 @@ <a href="http://caml.inria.fr/">Objective Camlu</a> i wymaga <em>ocamlbuilda</em> i <em>make</em> do kompilacji. </item> - <item>Pod - <a href="http://www.ubuntu.com/">Ubuntu</a>, + <item>Pod <a href="http://www.ubuntu.com/">Ubuntu</a>, poniższe polecenie zainstaluje pakiety niezbędne do kompilacji Tossa.<br/> - <em>sudo apt-get install menhir libjs-of-ocaml-dev phantomjs</em> + <em>sudo apt-get install menhir liblwt-ocaml-dev + phantomjs</em><br/> Potem trzeba ściągnąć + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> + js_of_ocaml</a>, rozpakować i wykonać <em>make; sudo make install</em> </item> <item>Pod <a href="http://www.apple.com/macosx/">MacOSX</a> polecamy zainstalować <a href="http://www.macports.org/">MacPorts</a> (wymaga Xcode) i wywołać poniższe polecenie.<br/> <em>sudo port install ocaml ocaml-menhir ocaml-lwt - phantomjs</em><br/> potem ściągnąć - <a href="http://ocsigen.org/download/js_of_ocaml-1.0.9.tar.gz"> + phantomjs</em><br/> Potem trzeba ściągnąć + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> js_of_ocaml</a>, rozpakować i wykonać <em>make; sudo make install</em> </item> <item>Poniższe polecenie ściągnie @@ -116,14 +125,17 @@ <item>Si vous souhaitez développer Toss sur <a href="http://www.ubuntu.com/">Ubuntu</a>, voici une commande avec une liste des paquets à installer.<br/> - <em>sudo apt-get install menhir libjs-of-ocaml-dev phantomjs</em> + <em>sudo apt-get install menhir liblwt-ocaml-dev + phantomjs</em><br/> Ensuite téléchargez + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> + js_of_ocaml</a>, déballer et faire <em>make; sudo make install</em> </item> <item>Si vous souhaitez développer Toss sur <a href="http://www.apple.com/macosx/">MacOSX</a>, installe <a href="http://www.macports.org/">MacPorts</a> (et Xcode) et faire<br/> <em>sudo port install ocaml ocaml-menhir ocaml-lwt - phantomjs</em><br/> téléchargez - <a href="http://ocsigen.org/download/js_of_ocaml-1.0.9.tar.gz"> + phantomjs</em><br/> Ensuite téléchargez + <a href="http://ocsigen.org/download/js_of_ocaml-1.1.tar.gz"> js_of_ocaml</a>, déballer et faire <em>make; sudo make install</em> </item> <item>Cette commande checkout du Modified: trunk/Toss/www/docs.xml =================================================================== --- trunk/Toss/www/docs.xml 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/www/docs.xml 2012-03-21 20:03:14 UTC (rev 1696) @@ -179,10 +179,6 @@ Structure Rewriting Games</a>. </item> - <item><em>Idée et spécification</em> du Toss sont décrites dans - <a href="reference/reference.pdf">reference.pdf</a>. - </item> - <item><em>Complexité</em> d'un fragment syntaxique du Toss a été analysée dans le papier <a href="pub/graph_games_short.pdf">Synthesis for Structure Rewriting Systems</a>. Modified: trunk/Toss/www/ideas.xml =================================================================== --- trunk/Toss/www/ideas.xml 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/www/ideas.xml 2012-03-21 20:03:14 UTC (rev 1696) @@ -13,7 +13,7 @@ <link id="ideas" href="/ideas.html">Development Ideas</link> </history> - <section title="Google Summer of Code 2012"> +<!-- <section title="Google Summer of Code 2012"> <par>Toss is applying to participate in <em>Google Summer of Code</em> in 2012. This page contains a few ideas for students who wish to work on Toss this summer. But, most importantly, we welcome new ideas from @@ -22,7 +22,7 @@ Make sure to contact us, we are very positive about suggestions and we think that the best proposals (and code) come from students who are simply passionate about realizing their own ideas!<br/></par> - </section> + </section> <section title="Your Project Proposal"> <par>If you decide to present your own idea, here are a few questions @@ -47,14 +47,10 @@ <itemize> <item>Toss Mailing List: <mailto address="tos...@li..."/></item> - <item>Łukasz Kaiser (GSoC admin): + <item>Łukasz Kaiser: <mailto address="luk...@gm..."/></item> - <item>Łukasz Stafiniak (GSoC backup admin): - <mailto address="luk...@gm..."/></item> - <item>Michał Wójcik: - <mailto address="mic...@gm..."/></item> </itemize> - </section> + </section> --> <section title="Idea: Go and Arimaa"> @@ -213,7 +209,7 @@ standard games well, including single-player games which do not translate well now. By the end, the majority of games in GDL will translate well and will be made usable from the web interface. The GGP Competition - starts around the end of GSoC, so of course the best final goal would be + starts around autumn, so of course the best final goal would be for Toss to score a win there! <br/><br/></par> <par><em>Modules (in planned construction order).</em> Modified: trunk/Toss/www/index.xml =================================================================== --- trunk/Toss/www/index.xml 2012-03-16 01:52:25 UTC (rev 1695) +++ trunk/Toss/www/index.xml 2012-03-21 20:03:14 UTC (rev 1696) @@ -266,38 +266,6 @@ </section> - <section title="Scientific Background of Toss" lang="en"> - <par>To learn more about the mathematical background and - the design of Toss, use the following links.</par> - <itemize> - <item><em>Compact description</em> of the mathematical model behind Toss - and our UCT game playing algorithm can be found in the paper - <a href="pub/playing_structure_rewriting_games.pdf">Playing - Structure Rewriting Games</a>. - </item> - - <item><em>Design and specification</em> of Toss are described in - the <a href="reference/reference.pdf">reference.pdf</a> document. - </item> - - <item> <em>Complexity</em> of a syntactic fragment of Toss was analyzed in - the paper <a href="pub/graph_games_short.pdf">Synthesis - for Structure Rewriting Systems</a>. - </item> - - <item><em>Presentation</em> on the mathematics behind Toss was given at - <em>IIT Kanpur</em> and can be - <a href="http://www2.cse.iitk.ac.in/~fsttcs/2009/videos/star/LukaszKaiser.avi"> - watched</a> online. - </item> - - <item><em>Shorter presentation</em> focusing on the AI side was given at - <em>AGI 2010</em> and can also be - <a href="http://www.vimeo.com/15326245">watched</a> online. - </item> - </itemize> - </section> - <section title="Mathematische Grundlagen von Toss" lang="de"> <par>Um mehr über Toss zu erfahren, folge diesen Links.</par> <itemize> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |