/usr/share/doc/racket/games/new-games.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>2 Implementing New Games</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Games:<span class="mywbr"> </span> Fun Examples</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="bundled.html" class="tocviewlink" data-pltdoc="x">Bundled Games</a></td></tr><tr><td align="right">2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Implementing New Games</a></td></tr><tr><td align="right">3 </td><td><a href="Showing_Scribbled_Help.html" class="tocviewlink" data-pltdoc="x">Showing Scribbled Help</a></td></tr><tr><td align="right">4 </td><td><a href="Showing_Text_Help.html" class="tocviewlink" data-pltdoc="x">Showing Text Help</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="gcalc.html" title="backward to "1.20 GCalc --- Visual λ-Calculus"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Games: Fun Examples"" data-pltdoc="x">up</a> <a href="Showing_Scribbled_Help.html" title="forward to "3 Showing Scribbled Help"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "games/scribblings/games.scrbl")" x-part-tag=""new-games"">2<tt> </tt><a name="(part._new-games)"></a>Implementing New Games</h3><p>The game-starting console inspects the sub-collections of the
<span class="stt">"games"</span> collection. If a sub-collection has an
<span class="stt">"info.rkt"</span> module (see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=info_rkt.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">info</span></a>), the
following fields of the collection’s <span class="stt">"info.rkt"</span> file are used:</p><ul><li><p><span class="RktSym">game</span> [required] : used as a module name in the
sub-collection to load for the game; the module must provide a
<span class="RktSym">game@</span> unit (see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=mzlib_unit.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/unit</span></a>) with
no particular exports; the unit is invoked with no imports to
start the game.</p></li><li><p><span class="RktSym">name</span> [defaults to the collection name] : used to
label the game-starting button in the game console.</p></li><li><p><span class="RktSym">game-icon</span> [defaults to collection name with
<span class="stt">".png"</span>] : used as a path to a bitmap file that is used for
the game button’s label; this image should be 32 by 32 pixels and
have a mask.</p></li><li><p><span class="RktSym">game-set</span> [defaults to <span class="RktVal">"Other Games"</span>] :
a label used to group games that declare themselves to be in the
same set.</p></li></ul><p>To implement card games, see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=cards&rel=index.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">games/cards</span></a>. Card games
typically belong in the <span class="RktVal">"Cards"</span> game set.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="gcalc.html" title="backward to "1.20 GCalc --- Visual λ-Calculus"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Games: Fun Examples"" data-pltdoc="x">up</a> <a href="Showing_Scribbled_Help.html" title="forward to "3 Showing Scribbled Help"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|