/usr/share/doc/racket/games/Overview.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 | <!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>1.18.1 Overview</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="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="bundled.html" class="tocviewselflink" data-pltdoc="x">Bundled Games</a></td></tr><tr><td align="right">2 </td><td><a href="new-games.html" class="tocviewlink" 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 class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>1 </td><td><a href="bundled.html" class="tocviewlink" data-pltdoc="x">Bundled Games</a></td></tr></table><div class="tocviewsublist" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.1 </td><td><a href="aces.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="aces.png" alt="" width="24" height="32"/></span> <span class="ssansserif">Aces</span> —<wbr></wbr> Solitaire Card Game</a></td></tr><tr><td align="right">1.2 </td><td><a href="gofish.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="gofish.png" alt="" width="28" height="32"/></span> <span class="ssansserif">Go Fish</span> —<wbr></wbr> Kid’s Card Game</a></td></tr><tr><td align="right">1.3 </td><td><a href="crazy8s.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="crazy8s.png" alt="" width="24" height="32"/></span> <span class="ssansserif">Crazy 8s</span> —<wbr></wbr> Card Game</a></td></tr><tr><td align="right">1.4 </td><td><a href="blackjack.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="blackjack.png" alt="" width="28" height="32"/></span> <span class="ssansserif">Blackjack</span> —<wbr></wbr> 21 Card Game</a></td></tr><tr><td align="right">1.5 </td><td><a href="ginrummy.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="ginrummy.png" alt="" width="28" height="32"/></span> <span class="ssansserif">Rummy</span> —<wbr></wbr> Card Game</a></td></tr><tr><td align="right">1.6 </td><td><a href="spider.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="spider.png" alt="" width="24" height="32"/></span> <span class="ssansserif">Spider</span> —<wbr></wbr> Solitaire Card Game</a></td></tr><tr><td align="right">1.7 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="memory.png" alt="" width="26" height="32"/></span> <span class="ssansserif">Memory</span> —<wbr></wbr> Kid’s Game</a></td></tr><tr><td align="right">1.8 </td><td><a href="slidey.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="slidey.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Slidey</span> —<wbr></wbr> Picture Puzzle</a></td></tr><tr><td align="right">1.9 </td><td><a href="same.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="same.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Same</span> —<wbr></wbr> Dot-<wbr></wbr>Removing Game</a></td></tr><tr><td align="right">1.10 </td><td><a href="mines.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="mines.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Minesweeper</span> —<wbr></wbr> Logic Game</a></td></tr><tr><td align="right">1.11 </td><td><a href="paint-by-numbers.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="paint-by-numbers.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Paint By Numbers</span> —<wbr></wbr> Logic Game</a></td></tr><tr><td align="right">1.12 </td><td><a href="lights-out.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="lights-out.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Lights Out</span> —<wbr></wbr> Logic Game</a></td></tr><tr><td align="right">1.13 </td><td><a href="pousse.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="pousse.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Pousse</span> —<wbr></wbr> Tic-<wbr></wbr>Tac-<wbr></wbr>Toe-<wbr></wbr>like Game</a></td></tr><tr><td align="right">1.14 </td><td><a href="gobblet.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="gobblet.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Gobblet</span> —<wbr></wbr> Strategy Game</a></td></tr><tr><td align="right">1.15 </td><td><a href="jewel.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="jewel.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Jewel</span> —<wbr></wbr> 3-<wbr></wbr>D Skill Game</a></td></tr><tr><td align="right">1.16 </td><td><a href="parcheesi.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="parcheesi.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Parcheesi</span> —<wbr></wbr> Board Game</a></td></tr><tr><td align="right">1.17 </td><td><a href="checkers.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="checkers.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Checkers</span> —<wbr></wbr> Board Game</a></td></tr><tr><td align="right">1.18 </td><td><a href="chat-noir.html" class="tocviewselflink" data-pltdoc="x"><span class="noborder"><img src="chat-noir.png" alt="" width="40" height="19"/></span> <span class="ssansserif">Chat Noir</span> —<wbr></wbr> Puzzle Game</a></td></tr><tr><td align="right">1.19 </td><td><a href="tally-maze.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="tally-maze.png" alt="" width="32" height="32"/></span> <span class="ssansserif">Tally Maze</span> —<wbr></wbr> Maze Enumeration Game</a></td></tr><tr><td align="right">1.20 </td><td><a href="gcalc.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="gcalc.png" alt="" width="32" height="32"/></span> <span class="ssansserif">GCalc</span> —<wbr></wbr> Visual λ-<wbr></wbr>Calculus</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">▼</a></td><td>1.18 </td><td><a href="chat-noir.html" class="tocviewlink" data-pltdoc="x"><span class="noborder"><img src="chat-noir.png" alt="" width="40" height="19"/></span> <span class="ssansserif">Chat Noir</span> —<wbr></wbr> Puzzle Game</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.18.1 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Overview</a></td></tr><tr><td align="right">1.18.2 </td><td><a href="The_World.html" class="tocviewlink" data-pltdoc="x">The World</a></td></tr><tr><td align="right">1.18.3 </td><td><a href="Breadth-first_Search.html" class="tocviewlink" data-pltdoc="x">Breadth-<wbr></wbr>first Search</a></td></tr><tr><td align="right">1.18.4 </td><td><a href="Board_to_Graph.html" class="tocviewlink" data-pltdoc="x">Board to Graph</a></td></tr><tr><td align="right">1.18.5 </td><td><a href="The_Cat_s_Path.html" class="tocviewlink" data-pltdoc="x">The Cat’s Path</a></td></tr><tr><td align="right">1.18.6 </td><td><a href="Drawing_the_Cat.html" class="tocviewlink" data-pltdoc="x">Drawing the Cat</a></td></tr><tr><td align="right">1.18.7 </td><td><a href="Drawing_the_World.html" class="tocviewlink" data-pltdoc="x">Drawing the World</a></td></tr><tr><td align="right">1.18.8 </td><td><a href="Handling_Input.html" class="tocviewlink" data-pltdoc="x">Handling Input</a></td></tr><tr><td align="right">1.18.9 </td><td><a href="Tests.html" class="tocviewlink" data-pltdoc="x">Tests</a></td></tr><tr><td align="right">1.18.10 </td><td><a href="Run__program__run.html" class="tocviewlink" data-pltdoc="x">Run, program, run</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="Smaller"><a href="#%28elem._%28chunk._~3cmain~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><main></a></span></td></tr><tr><td><span class="Smaller"><a href="#%28elem._%28chunk._~3ctests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><tests></a></span></td></tr></table></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="chat-noir.html" title="backward to "1.18 Chat Noir --- Puzzle Game"" data-pltdoc="x">← prev</a> <a href="chat-noir.html" title="up to "1.18 Chat Noir --- Puzzle Game"" data-pltdoc="x">up</a> <a href="The_World.html" title="forward to "1.18.2 The World"" data-pltdoc="x">next →</a></span> </div><h5 x-source-module="(lib "games/scribblings/games.scrbl")" x-part-tag=""Overview"">1.18.1<tt> </tt><a name="(part._.Overview)"></a>Overview</h5><p>Chat Noir is implemented using <a href="http://www.htdp.org/">HtDP</a>’s universe
library: <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=teachpack&rel=2htdpuniverse.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">2htdp/universe</span></a>
(although it only uses the “world” portions of that library).
The program is divided up into
six parts: the world data definition, an implementation of breadth-first search,
code that handles drawing of the world, code that handles user input,
and some code that builds an initial world and starts the game.</p><p><div class="SIntrapara"><a name="(elem._(chunk._~3cmain~3e~3a1))"></a><span style="font-weight: bold"><span style="font-style: italic"><a href="#%28elem._%28chunk._~3cmain~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><main></a></span> ::=</span></div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">racket/list</span><span class="hspace"> </span><span class="RktSym">racket/math</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">for-syntax</a></span><span class="hspace"> </span><span class="RktSym">racket/base</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">2htdp/universe</span><span class="hspace"> </span><span class="RktSym">htdp/image</span><span class="hspace"> </span><span class="RktSym">lang/posn</span><span class="hspace"> </span><span class="RktSym">racket/contract</span><span class="RktPn">)</span></td></tr><tr><td><a href="The_World.html#%28elem._%28chunk._~3cworld~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><world></a></td></tr><tr><td><a href="Breadth-first_Search.html#%28elem._%28chunk._~3cbreadth-first-search~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><breadth-first-search></a></td></tr><tr><td><a href="Board_to_Graph.html#%28elem._%28chunk._~3cboard-~3egraph~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><board->graph></a></td></tr><tr><td><a href="The_Cat_s_Path.html#%28elem._%28chunk._~3ccats-path~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><cats-path></a></td></tr><tr><td><a href="Drawing_the_Cat.html#%28elem._%28chunk._~3cdrawing-the-cat~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><drawing-the-cat></a></td></tr><tr><td><a href="Drawing_the_World.html#%28elem._%28chunk._~3cdrawing~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><drawing></a></td></tr><tr><td><a href="Handling_Input.html#%28elem._%28chunk._~3cinput~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><input></a></td></tr><tr><td><a href="Run__program__run.html#%28elem._%28chunk._~3cinitial-world~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><initial-world></a></td></tr><tr><td><a href="#%28elem._%28chunk._~3ctests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><tests></a></td></tr><tr><td><a href="Run__program__run.html#%28elem._%28chunk._~3cgo~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><go></a></td></tr></table></blockquote></div></p><p>Each section also comes with a series of test cases that are collected into the
<a href="#%28elem._%28chunk._~3ctests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><tests></a>
chunk at the end of the program.</p><p><div class="SIntrapara"><a name="(elem._(chunk._~3ctests~3e~3a1))"></a><span style="font-weight: bold"><span style="font-style: italic"><a href="#%28elem._%28chunk._~3ctests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><tests></a></span> ::=</span></div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><a href="Tests.html#%28elem._%28chunk._~3ctest-infrastructure~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><test-infrastructure></a></td></tr><tr><td><a href="The_World.html#%28elem._%28chunk._~3cworld-tests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><world-tests></a></td></tr><tr><td><a href="Board_to_Graph.html#%28elem._%28chunk._~3cboard-~3egraph-tests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><board->graph-tests></a></td></tr><tr><td><a href="Breadth-first_Search.html#%28elem._%28chunk._~3cbreadth-first-search-tests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><breadth-first-search-tests></a></td></tr><tr><td><a href="The_Cat_s_Path.html#%28elem._%28chunk._~3ccats-path-tests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><cats-path-tests></a></td></tr><tr><td><a href="Drawing_the_World.html#%28elem._%28chunk._~3cdrawing-tests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><drawing-tests></a></td></tr><tr><td><a href="Handling_Input.html#%28elem._%28chunk._~3cinput-tests~3e~3a1%29%29" class="plainlink" data-pltdoc="x"><input-tests></a></td></tr></table></blockquote></div></p><p>Each test case uses either <span class="RktSym">test</span>, a simple form that accepts two
arguments and compares them with <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">equal?</a></span>, or <span class="RktSym">test/set</span>
which accepts two lists and compares them as if they were sets.</p><p>In general, most of the test cases are left to the end of the document, organized
in a series of chunks that match the functions being tested. Some of the test cases,
however, provide nice illustrations of the behavior of the function and so are
included in the function’s description.</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="chat-noir.html" title="backward to "1.18 Chat Noir --- Puzzle Game"" data-pltdoc="x">← prev</a> <a href="chat-noir.html" title="up to "1.18 Chat Noir --- Puzzle Game"" data-pltdoc="x">up</a> <a href="The_World.html" title="forward to "1.18.2 The World"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|