[Toss-devel-svn] SF.net SVN: toss:[1278] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2011-01-09 23:36:47
|
Revision: 1278
http://toss.svn.sourceforge.net/toss/?rev=1278&view=rev
Author: lukaszkaiser
Date: 2011-01-09 23:36:40 +0000 (Sun, 09 Jan 2011)
Log Message:
-----------
Correcting examples and webclient.
Modified Paths:
--------------
trunk/Toss/WebClient/Connect.js
trunk/Toss/WebClient/Main.js
trunk/Toss/WebClient/MakeDB.py
trunk/Toss/WebClient/Style.css
trunk/Toss/WebClient/contact.html
trunk/Toss/WebClient/favicon.ico
trunk/Toss/WebClient/index.html
trunk/Toss/WebClient/profile.html
trunk/Toss/WebClient/register.html
trunk/Toss/examples/Checkers.toss
trunk/Toss/examples/Tic-Tac-Toe.toss
trunk/Toss/www/links.php
Modified: trunk/Toss/WebClient/Connect.js
===================================================================
--- trunk/Toss/WebClient/Connect.js 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/Connect.js 2011-01-09 23:36:40 UTC (rev 1278)
@@ -133,10 +133,12 @@
var all_moves = convert_python_list (';', MOVES_STR);
var elem_moves = []
for (i = 0; i < all_moves.length; i++) {
- if (all_moves[i].indexOf(elem) >= 0) {
+ var br = all_moves[i].indexOf(":");
+ if (br < 0) { br = 0; };
+ if (all_moves[i].indexOf(elem, br) > br) {
if (other == "") {
elem_moves.push(all_moves[i])
- } else if (all_moves[i].indexOf(other) >= 0) {
+ } else if (all_moves[i].indexOf(other, br) > br) {
elem_moves.push(all_moves[i])
}
}
Modified: trunk/Toss/WebClient/Main.js
===================================================================
--- trunk/Toss/WebClient/Main.js 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/Main.js 2011-01-09 23:36:40 UTC (rev 1278)
@@ -368,13 +368,21 @@
}
function suggest_move () {
+ document.getElementById("working").innerHTML = "Calculating move...";
+ document.getElementById("working").style.display = "block";
var m = srv("SUGGEST", 'c, '+ play_py_id (CUR_PLAY_I));
+ document.getElementById("working").style.display = "none";
+ document.getElementById("working").innerHTML = "Working...";
if (m != "") { show_move (m); }
return (m);
}
function suggest_move_better () {
+ document.getElementById("working").innerHTML = "Calculating move...";
+ document.getElementById("working").style.display = "block";
var m = srv("SUGGESTX", 'c, '+ play_py_id (CUR_PLAY_I));
+ document.getElementById("working").style.display = "none";
+ document.getElementById("working").innerHTML = "Working...";
if (m != "") { show_move (m); }
return (m);
}
Modified: trunk/Toss/WebClient/MakeDB.py
===================================================================
--- trunk/Toss/WebClient/MakeDB.py 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/MakeDB.py 2011-01-09 23:36:40 UTC (rev 1278)
@@ -45,7 +45,24 @@
os.chmod (db_file, 0777)
+def reload_games (db_file, games_path, games):
+ conn = sqlite3.connect(db_file)
+ conn.execute ("delete from games");
+ print "Deleted old games";
+ for g in games:
+ f = open(games_path + "/" + g + ".toss")
+ toss = f.read()
+ f.close()
+ conn.execute ("insert into games(game, toss) values (?, ?)", (g, toss))
+ print ("Reloading games: added " + g)
+ conn.commit ()
+
if __name__ == "__main__":
- print "Creating empty Toss DB"
- create_db (DB_FILE, GAMES_PATH, GAMES)
- print "Created tossdb.sqlite"
+ if os.path.exists (DB_FILE):
+ print ("Reloading games into Toss DB (" + DB_FILE + ")")
+ reload_games (DB_FILE, GAMES_PATH, GAMES)
+ print "Games reloaded"
+ else:
+ print ("Creating empty Toss DB (" + DB_FILE + ")")
+ create_db (DB_FILE, GAMES_PATH, GAMES)
+ print "Created tossdb.sqlite"
Modified: trunk/Toss/WebClient/Style.css
===================================================================
--- trunk/Toss/WebClient/Style.css 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/Style.css 2011-01-09 23:36:40 UTC (rev 1278)
@@ -15,7 +15,7 @@
padding: 0px;
margin: 0px;
text-align: center;
- background-color: #b5bf8f;
+ background-color: #f7ffd8;
font-family: Verdana, 'TeXGyreHerosRegular', sans;
}
@@ -43,7 +43,7 @@
float: right;
}
-.obt {
+.obt, .boldobt {
text-align: left;
border-color: #260314;
border-radius: 4px;
@@ -60,6 +60,16 @@
text-decoration: underline;
}
+.boldobt {
+ font-weight: bold;
+ font-size: 1em;
+}
+
+.boldobt:hover {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
.dbt {
border-color: #fff1d4;
border-radius: 4px;
@@ -163,7 +173,7 @@
#logoutbt:hover {
cursor: pointer;
- color: #b5bf8f;
+ color: #f7ffd8;
}
#login1 {
@@ -191,6 +201,11 @@
padding-left: 0.25em;
}
+#logo img {
+ height: 1.5em;
+ width: 2.5em;
+}
+
#top a, #logo a:link, #logo a:active, #logo a:visited {
color: #fff1d4;
background-color: transparent;
@@ -198,7 +213,7 @@
}
#top a:hover {
- color: #b5bf8f;
+ color: #f7ffd8;
}
.logo-in {
@@ -323,12 +338,22 @@
}
#topbar a:hover {
- color: #b5bf8f;
+ color: #f7ffd8;
}
/* Content */
+.mail {
+ color: #260314;
+ text-decoration: underline;
+}
+
+.mail:hover {
+ cursor: pointer;
+ text-decoration: none;
+}
+
.game_list {
font-weight: bold;
}
@@ -505,7 +530,6 @@
font-weight: bold;
color: #fff1d4;
background-color: #400827;
- display: none;
padding: 1em;
}
@@ -585,9 +609,9 @@
#svg {
min-width: 10em;
max-width: 120em;
- width: 65%;
+ width: 75%;
min-height: 10em;
- max-height: 120em;
+ max-height: 35em;
height: 75%;
/* border: 1px solid #260314; */
}
@@ -611,7 +635,7 @@
}
.model-elem-highlight {
- fill: #b5bf8f;
+ fill: #f7ffd8;
stroke: #400827;
stroke-width: 3px;
}
@@ -651,6 +675,18 @@
stroke-width: 3px;
}
+.Game-Checkers .model-pred-B {
+ fill: #fff1d4;
+ stroke: #260314;
+ stroke-width: 3px;
+}
+
+.Game-Checkers .model-pred-W {
+ fill: #400827;
+ stroke: #260314;
+ stroke-width: 3px;
+}
+
.model-edge-E {
fill: #260314;
stroke: #260314;
Modified: trunk/Toss/WebClient/contact.html
===================================================================
--- trunk/Toss/WebClient/contact.html 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/contact.html 2011-01-09 23:36:40 UTC (rev 1278)
@@ -4,32 +4,51 @@
<meta http-equiv="Content-Type" content="text/xhtml+xml; charset=UTF-8" />
<title>tPlay — Contact</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
- <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
+ <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
<link href="fontstyle.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="Style.css" media="screen" title="Default"/>
+ <script type="text/javascript">
+ function begin_mailto (name, domain, title) {
+ var address = name + '@' + domain;
+ if(title) {
+ document.write("<a class='mail' href='mailto:" + address + "'>" + "<span>");
+ } else {
+ document.write("<a class='mail' href='mailto:" + address + "'>" +
+ address + "<span style='display: none;'>");
+ }
+ }
+ function end_mailto() {
+ document.write("</span></a>");
+ }
+ </script>
</head>
<body>
+
+<div id="main">
+
<div id="top">
-<div id="logo"><a href="index.html">tPlay</a></div>
+<div id="logo"><a href="index.html"><img src="toss.svg" alt="tPlay" /></a></div>
</div>
-<div id="main">
-
<div id="register-content">
<h2>Contact tPlay</h2>
-Just write us an email!
+Just write an email to
+<script type="text/javascript">begin_mailto("tossplay", "gmail.com");</script>
+tossplay [AT] gmail [DOT] com
+<script type="text/javascript">end_mailto();</script>
</div>
-</div>
-
<div id="bottom">
<a href="http://toss.sourceforge.net" id="toss-link">Powered by Toss</a>
<a href="contact.html" id="contact">Contact and Info</a>
</div>
+</div>
+
+
</body>
</html>
Modified: trunk/Toss/WebClient/favicon.ico
===================================================================
(Binary files differ)
Modified: trunk/Toss/WebClient/index.html
===================================================================
--- trunk/Toss/WebClient/index.html 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/index.html 2011-01-09 23:36:40 UTC (rev 1278)
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/xhtml+xml; charset=UTF-8" />
<title>tPlay</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
- <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
+ <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
<link href="fontstyle.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="Style.css" media="screen" title="Default"/>
<script type="text/javascript" src="crypto-sha256.js"> </script>
@@ -19,7 +19,7 @@
<div id="main">
<div id="top">
-<div id="logo"><a href="index.html">tPlay</a></div>
+<div id="logo"><a href="index.html"><img src="toss.svg" alt="tPlay" /></a></div>
<div id="topbar">
<span id="topuser"></span>
<form id="loginform" style="display: inline;">
@@ -96,38 +96,40 @@
<div id="plays">
<p class="game-par">
- <button class="bt" onclick="new_play ('Breakthrough')">New Game</button>
- <a href="http://en.wikipedia.org/wiki/Breakthrough_(board_game)"
- class="game_list">Breakthrough</a>
+ <button onclick="new_play('Breakthrough')"
+ class="boldobt">Breakthrough</button>
+ (<a href="http://en.wikipedia.org/wiki/Breakthrough_(board_game)">info</a>)
</p>
<ul class="plays-list" id="plays-list-Breakthrough"></ul>
<p class="game-par">
- <button class="bt" onclick="new_play ('Checkers')">New Game</button>
- <a class="game_list"
- href="http://en.wikipedia.org/wiki/English_draughts">Checkers</a>
+ <button onclick="new_play('Checkers')"
+ class="boldobt">Checkers</button>
+ (<a href="http://en.wikipedia.org/wiki/English_draughts">info</a>)
</p>
<ul class="plays-list" id="plays-list-Checkers"></ul>
<p class="game-par">
- <button class="bt" onclick="new_play ('Chess')">New Game</button>
- <a class="game_list" href="http://en.wikipedia.org/wiki/Chess">Chess</a>
+ <button onclick="new_play('Chess')"
+ class="boldobt">Chess</button>
+ (<a href="http://en.wikipedia.org/wiki/Chess">info</a>)
</p>
<ul class="plays-list" id="plays-list-Chess"></ul>
<p class="game-par">
- <button class="bt" onclick="new_play ('Entanglement')">New Game</button>
- <a href="http://en.wikipedia.org/wiki/Entanglement_(graph_measure)"
- class="game_list">Entanglement</a>
+ <button onclick="new_play('Entanglement')"
+ class="boldobt">Entanglement</button>
+ (<a href="http://en.wikipedia.org/wiki/Entanglement_(graph_measure)"
+ >info</a>)
</p>
<ul class="plays-list" id="plays-list-Entanglement"></ul>
<p class="game-par">
- <button class="bt" onclick="new_play ('Gomoku')">New Game</button>
- <a href="http://en.wikipedia.org/wiki/Gomoku"
- class="game_list">Gomoku</a>
+ <button onclick="new_play('Gomoku')"
+ class="boldobt">Gomoku</button>
+ (<a href="http://en.wikipedia.org/wiki/Gomoku">info</a>)
</p>
<ul class="plays-list" id="plays-list-Gomoku"></ul>
<p class="game-par">
- <button class="bt" onclick="new_play ('Tic-Tac-Toe')">New Game</button>
- <a href="http://en.wikipedia.org/wiki/Tic-tac-toe"
- class="game_list">Tic-Tac-Toe</a>
+ <button onclick="new_play('Tic-Tac-Toe')"
+ class="boldobt">Tic-Tac-Toe</button>
+ (<a href="http://en.wikipedia.org/wiki/Tic-tac-toe">info</a>)
</p>
<ul class="plays-list" id="plays-list-Tic-Tac-Toe"></ul>
</div>
Modified: trunk/Toss/WebClient/profile.html
===================================================================
--- trunk/Toss/WebClient/profile.html 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/profile.html 2011-01-09 23:36:40 UTC (rev 1278)
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/xhtml+xml; charset=UTF-8" />
<title>tPlay — Profile</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
- <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
+ <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
<link href="fontstyle.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="Style.css" media="screen" title="Default"/>
<script type="text/javascript" src="crypto-sha256.js"> </script>
@@ -16,7 +16,7 @@
<body onload="startup_profile()">
<div id="top">
-<div id="logo"><a href="index.html">tPlay</a></div>
+<div id="logo"><a href="index.html"><img src="toss.svg" alt="tPlay" /></a></div>
<div id="topbar">
<span id="topuser"></span>
<form id="loginform" style="display: inline;">
Modified: trunk/Toss/WebClient/register.html
===================================================================
--- trunk/Toss/WebClient/register.html 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/WebClient/register.html 2011-01-09 23:36:40 UTC (rev 1278)
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/xhtml+xml; charset=UTF-8" />
<title>tPlay — Registration</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
- <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
+ <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
<link href="fontstyle.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="Style.css" media="screen" title="Default"/>
<script type="text/javascript" src="crypto-sha256.js"> </script>
@@ -14,7 +14,7 @@
<body>
<div id="top">
-<div id="logo"><a href="index.html">tPlay</a></div>
+<div id="logo"><a href="index.html"><img src="toss.svg" alt="tPlay" /></a></div>
</div>
<div id="main">
Modified: trunk/Toss/examples/Checkers.toss
===================================================================
--- trunk/Toss/examples/Checkers.toss 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/examples/Checkers.toss 2011-01-09 23:36:40 UTC (rev 1278)
@@ -18,54 +18,56 @@
REL BeatsW (x, y) = ex z (b(z) and not b(y) and not w(y) and DiagW2 (x, z, y))
REL BeatsWX (x, y) = ex z (b(z) and not b(y) and not w(y) and Diag2 (x, z, y))
REL BeatsB (x, y) = ex z (w(z) and not b(y) and not w(y) and DiagB2 (x, z, y))
-REL BeatsBX (x, y) = ex z (w(z) and not b(y) and not w(y) and DiagB2 (x, z, y))
-RULE WhiteMove:
+REL BeatsBX (x, y) = ex z (w(z) and not b(y) and not w(y) and Diag2 (x, z, y))
+REL BJumps() = ex x, y ((B(x) and BeatsB (x, y)) or (Bq(x) and BeatsBX (x, y)))
+REL WJumps() = ex x, y ((W(x) and BeatsW (x, y)) or (Wq(x) and BeatsWX (x, y)))
+RULE RedMove:
[ a, b | W { a } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
->
[ a, b | W { b } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
emb w, b pre (not IsEight(b)) and (DiagWa(a, b) or DiagWb(a, b))
- and not ex x, y (W(x) and BeatsW (x, y))
-RULE BlackMove:
+ and not WJumps()
+RULE WhiteMove:
[ a, b | B { a } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
->
[ a, b | B { b } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
emb w, b pre (not IsFirst(b)) and (DiagBa(a, b) or DiagBb(a, b))
- and not ex x, y (B(x) and BeatsB (x, y))
-RULE WhitePromote:
+ and not BJumps()
+RULE RedPromote:
[ a, b | W { a } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
->
[ a, b | Wq { b } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
emb w, b pre (IsEight(b)) and (DiagWa(a, b) or DiagWb(a, b))
- and not ex x, y (W(x) and BeatsW (x, y))
-RULE BlackPromote:
+ and not WJumps()
+RULE WhitePromote:
[ a, b | B { a } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
->
[ a, b | Bq { b } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
emb w, b pre (IsFirst(b)) and (DiagBa(a, b) or DiagBb(a, b))
- and not ex x, y (B(x) and BeatsB(x, y))
-RULE WhiteQMove:
+ and not BJumps()
+RULE RedQMove:
[ a, b | Wq { a } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
->
[ a, b | Wq { b } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
- emb w, b pre AnyDiag (a, b)
-RULE BlackQMove:
+ emb w, b pre AnyDiag (a, b) and not WJumps()
+RULE WhiteQMove:
[ a, b | Bq { a } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
->
[ a, b | Bq { b } |
vx {a->0.,b->0.}; vy {a->0.,b->0.}; x {a->0.,b->10.}; y {a->0.,b->10.} ]
- emb w, b pre AnyDiag (a, b)
-RULE WhiteBeat:
+ emb w, b pre AnyDiag (a, b) and not BJumps()
+RULE RedBeat:
[ a, b, c | W { a }; b { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -74,8 +76,8 @@
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
emb w, b pre DiagW2 (a, b, c) and not IsEight(c)
- post not ex x, y (_new_W(x) and BeatsW (x, y))
-RULE BlackBeat:
+ post not ex x, y (_new_W(x) and BeatsWX (x, y))
+RULE WhiteBeat:
[ a, b, c | B { a }; w { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -84,18 +86,37 @@
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
emb w, b pre DiagB2 (a, b, c) and not IsFirst(c)
- post not ex x, y (_new_B(x) and BeatsB (x, y))
-RULE WhiteBeatPromote:
+ post not ex x, y (_new_B(x) and BeatsBX (x, y))
+RULE RedBeatBoth:
[ a, b, c | W { a }; b { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
->
+ [ a, b, c | W { c } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ emb w, b pre _new_W(a) and Diag2 (a, b, c) and not IsEight(c)
+ post not ex x, y (_new_W(x) and BeatsWX (x, y))
+RULE WhiteBeatBoth:
+ [ a, b, c | B { a }; w { b } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ ->
+ [ a, b, c | B { c } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ emb w, b pre _new_B(a) and Diag2 (a, b, c) and not IsFirst(c)
+ post not ex x, y (_new_B(x) and BeatsBX (x, y))
+RULE RedBeatPromote:
+ [ a, b, c | W { a }; b { b } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ ->
[ a, b, c | Wq { c } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
emb w, b pre DiagW2 (a, b, c) and IsEight(c)
- post not ex x, y (_new_W(x) and BeatsW (x, y))
-RULE BlackBeatPromote:
+RULE WhiteBeatPromote:
[ a, b, c | B { a }; w { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -104,8 +125,27 @@
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
emb w, b pre DiagB2 (a, b, c) and IsFirst(c)
- post not ex x, y (_new_B(x) and BeatsB (x, y))
+RULE RedBeatCont:
+ [ a, b, c | W { a }; b { b } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ ->
+ [ a, b, c | W { c } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ emb w, b pre DiagW2 (a, b, c) and not IsEight(c)
+ post ex x, y (_new_W(x) and BeatsWX (x, y))
RULE WhiteBeatCont:
+ [ a, b, c | B { a }; w { b } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ ->
+ [ a, b, c | B { c } |
+ vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
+ x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
+ emb w, b pre DiagB2 (a, b, c) and not IsFirst(c)
+ post ex x, y (_new_B(x) and BeatsBX (x, y))
+RULE RedBeatBothCont:
[ a, b, c | W { a }; b { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -113,8 +153,9 @@
[ a, b, c | W { c } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
- emb w, b pre Diag2 (a, b, c) post ex x, y (_new_W(x) and BeatsW (x, y))
-RULE BlackBeatCont:
+ emb w, b pre _new_W(a) and Diag2 (a, b, c) and not IsEight(c)
+ post ex x, y (_new_W(x) and BeatsWX (x, y))
+RULE WhiteBeatBothCont:
[ a, b, c | B { a }; w { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -122,8 +163,9 @@
[ a, b, c | B { c } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
- emb w, b pre Diag2 (a, b, c) post ex x, y (_new_B(x) and BeatsB (x, y))
-RULE WhiteQBeat:
+ emb w, b pre _new_B(a) and Diag2 (a, b, c) and not IsFirst(c)
+ post ex x, y (_new_B(x) and BeatsBX (x, y))
+RULE RedQBeat:
[ a, b, c | Wq { a }; b { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -132,7 +174,7 @@
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
emb w, b pre Diag2 (a, b, c)
-RULE BlackQBeat:
+RULE WhiteQBeat:
[ a, b, c | Bq { a }; w { b } |
vx {a->0.,b->0.,c->0.}; vy {a->0.,b->0.,c->0.};
x {a->0.,b->10.,c->20.}; y {a->0.,b->10.,c->20.} ]
@@ -147,9 +189,9 @@
1: :(ex x w(x)) - :(ex x b(x));
2: :(ex x b(x)) - :(ex x w(x))
}
- MOVES [WhiteMove -> 1]; [WhitePromote -> 1]; [WhiteQMove -> 1];
- [WhiteBeat -> 1]; [WhiteBeatPromote -> 1]; [WhiteQBeat -> 1];
- [WhiteBeatCont -> 2]
+ MOVES [RedMove -> 1]; [RedPromote -> 1]; [RedQMove -> 1];
+ [RedBeat -> 1]; [RedBeatPromote -> 1]; [RedQBeat -> 1];
+ [RedBeatCont -> 2]
}
LOC 1 {
PLAYER 2
@@ -157,9 +199,9 @@
1: :(ex x w(x)) - :(ex x b(x));
2: :(ex x b(x)) - :(ex x w(x))
}
- MOVES [BlackMove -> 0]; [BlackPromote -> 0]; [BlackQMove -> 0];
- [BlackBeat -> 0]; [BlackBeatPromote -> 0]; [BlackQBeat -> 0];
- [BlackBeatCont -> 3]
+ MOVES [WhiteMove -> 0]; [WhitePromote -> 0]; [WhiteQMove -> 0];
+ [WhiteBeat -> 0]; [WhiteBeatPromote -> 0]; [WhiteQBeat -> 0];
+ [WhiteBeatCont -> 3]
}
LOC 2 {
PLAYER 1
@@ -167,7 +209,7 @@
1: :(ex x w(x)) - :(ex x b(x));
2: :(ex x b(x)) - :(ex x w(x))
}
- MOVES [WhiteBeat -> 1]; [WhiteBeatPromote -> 1]; [WhiteBeatCont -> 2]
+ MOVES [RedBeatBoth -> 1]; [RedBeatPromote -> 1]; [RedBeatBothCont -> 2]
}
LOC 3 {
PLAYER 2
@@ -175,7 +217,7 @@
1: :(ex x w(x)) - :(ex x b(x));
2: :(ex x b(x)) - :(ex x w(x))
}
- MOVES [BlackBeat -> 0]; [BlackBeatPromote -> 0]; [BlackBeatCont -> 3]
+ MOVES [WhiteBeatBoth -> 0]; [WhiteBeatPromote -> 0]; [WhiteBeatBothCont -> 3]
}
MODEL [ | Wq:1 { }; Bq:1 { } |
] "
Modified: trunk/Toss/examples/Tic-Tac-Toe.toss
===================================================================
--- trunk/Toss/examples/Tic-Tac-Toe.toss 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/examples/Tic-Tac-Toe.toss 2011-01-09 23:36:40 UTC (rev 1278)
@@ -1,5 +1,5 @@
PLAYERS 1, 2
-DATA r1: circle, r2: line, adv_ratio: 4, depth: 4
+DATA r1: circle, r2: line, adv_ratio: 4, depth: 3
REL DiagA (x, y) = ex u (R(x, u) and C(u, y))
REL DiagB (x, y) = ex u (R(x, u) and C(y, u))
REL Row3 (x, y, z) = R(x, y) and R(y, z)
Modified: trunk/Toss/www/links.php
===================================================================
--- trunk/Toss/www/links.php 2011-01-09 20:58:08 UTC (rev 1277)
+++ trunk/Toss/www/links.php 2011-01-09 23:36:40 UTC (rev 1278)
@@ -4,6 +4,7 @@
$prefix = "";
$url = "links.php";
+$style = "";
$title = "Toss Links Page";
$body = '
<div class="main">
@@ -20,6 +21,18 @@
Zillions of Games is a language for defining games together with a simulator
and a large library of games. It is very nice but unluckily not open source.</p>
+<p><a href="http://www.kurnik.pl/">Kurnik</a><br/>
+Kurnik is a polish site on which you can play various games.</p>
+
+<p><a href="http://abstractstrategy.com/main.html">Abstract Strategy Games</a><br/>
+Abstract Strategy Games site allows you to learn and play such games.</p>
+
+<p><a href="http://www.yourturnmyturn.com/">Your Turn My Turn</a><br/>
+On Your-Turn-My-Turn you can play various board games online.</p>
+
+
+
+
<h2>Modelling Tools</h2>
<p><a href="http://edu.kde.org/step/">Step</a><br/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|