games 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. .TH GAMES 1
  2. .SH NAME
  3. mahjongg, sokoban, sudoku \- time wasters
  4. .SH SYNOPSIS
  5. .B games/4s
  6. .br
  7. .B games/5s
  8. .br
  9. .B games/juggle
  10. [
  11. .B -d
  12. .I delay
  13. ] [
  14. .B -h
  15. .I hands
  16. ] [
  17. .I start
  18. ]
  19. .I pattern
  20. .br
  21. .B games/mahjongg
  22. [
  23. .B -c
  24. ] [
  25. .B -b
  26. .I background
  27. ] [
  28. .B -t
  29. .I tileset
  30. ] [
  31. .B -l
  32. .I layout
  33. ]
  34. .br
  35. .B games/sokoban
  36. [
  37. .I level
  38. ]
  39. .br
  40. .B games/sudoku
  41. .SH DESCRIPTION
  42. There are a few games in
  43. .BR /bin/games :
  44. .TP \w'\fLfireworksXX'u
  45. .BR 4s , " 5s"
  46. Try to fill complete rows using 4-square or 5-square tiles.
  47. Move tiles left or right by moving the mouse.
  48. Rotate tiles with buttons 1 and 3.
  49. Drop tiles for more points with button 2 or the space bar.
  50. Move the mouse out of or back into the play area to
  51. suspend or resume the game.
  52. Keys
  53. .LR a
  54. and
  55. .LR j
  56. move left,
  57. .LR s
  58. and
  59. .LR k
  60. rotate left,
  61. .LR d
  62. and
  63. .LR l
  64. rotate right,
  65. .LR f
  66. and
  67. .LR ;
  68. move right.
  69. .LR z ,
  70. .LR p
  71. and
  72. .LR Esc
  73. toggle suspend/resume.
  74. .LR q ,
  75. .LR Del
  76. and
  77. .LR control-D
  78. quit.
  79. .TP
  80. .B juggle
  81. Display the juggling
  82. .I pattern
  83. using the optional initial
  84. .I start
  85. pattern.
  86. The number of hands involved (default 2) can be specified with
  87. .BR -h ,
  88. and
  89. .I delay
  90. can be used to speed up or slow down the action (default is 20).
  91. Try the pattern 333333441333333 or 333353505151512333333
  92. or YWUSQOMKIGECA
  93. (see
  94. .IR http://seehuhn.de/jong/theory.html ).
  95. .TP
  96. .B mahjongg
  97. Remove all tiles
  98. from the board. Click on tiles with the same face that
  99. are not blocked by others. A blocked tile is one that is partially or
  100. fully covered on top or has neighbouring tiles to the left and right.
  101. The game finishes when either all tiles are gone or there are no
  102. more moves left. The arguments are for changing background
  103. .RB (-b),
  104. tile
  105. .RB (-t)
  106. and layout
  107. .RB (-l)
  108. images;
  109. .RB -c
  110. selects a true-color buffer image, use with
  111. drawterm or in case selecting a tile obscures it completely.
  112. The
  113. .LR N
  114. key will generate a new level,
  115. .LR R
  116. restarts the current one.
  117. .LR Q
  118. and
  119. .LR Del
  120. quit,
  121. .LR H
  122. gives a hint, either trying to match the currently selected tile, or if no tile is
  123. selected finding out the first available tile.
  124. .TP
  125. .B sokoban
  126. Guide Glenda through a room full of walls, pebbles and holes to put
  127. the pebbles in. Your goal is to arrange all pebbles into holes by
  128. pushing them around, but you can only push a pebble if there is no
  129. wall or another pebble blocking the way.
  130. Arrow keys move Glenda up-down-left-right.
  131. .LR N
  132. and
  133. .LR P
  134. keys switch between
  135. the next and previous levels,
  136. .LR R
  137. restarts the current level.
  138. .LR Del
  139. and
  140. .LR Q
  141. quit. Button 3 invokes a menu to restart the current level, load different level sets, and en- and disable animation of multi-step moves.
  142. Button 2 lets you change between levels.
  143. Button 1 lets you do multi-step moves and pushes,
  144. by clicking it on the destination where you want Glenda to go.
  145. Glenda will only move if it can reach the destination.
  146. For a multi-step push the pebble must be next to Glenda,
  147. the destination must be on the same row or column,
  148. and there must be a free place next to the destination
  149. where the pebble can be pushed to.
  150. Otherwise, if possible, Glenda will walk to the destination without pushing the pebble.
  151. .I Sokoban
  152. accepts a level file as its argument.
  153. .TP
  154. .B sudoku
  155. .I Sudoku
  156. is a puzzle game from Japan. The goal of the game is to
  157. fill the numbers 1 to 9 in all squares of the 9x9 board following a
  158. few simple rules: no digit should repeat on the same row and column,
  159. and no digit should repeat in the same 3x3 boxes outlined with thicker
  160. lines. The board is initially filled with a partial solution which
  161. can be used for inferring digits for the empty squares. The top row
  162. of the board contains the digits 1 through 9, clicking on one of those
  163. digits selects that number for placement on the board, clicking it
  164. again will deselect that digit. Clicking on an empty square will then
  165. affix the square with the selected digit or, if no digit is selected
  166. empty the square.
  167. .IP
  168. Button 3 presents a menu with the following options:
  169. .RS \w'\fLfireworksXX'u
  170. .TP \w'\fLOffsetXX'u
  171. .B New
  172. autogenerate a new, random board
  173. .TP
  174. .B Check
  175. mark in red any digits not placed according to the rules
  176. .TP
  177. .B Solve
  178. present the board's solution
  179. .TP
  180. .B Clear
  181. clear the board to its starting (or last loaded) state
  182. .TP
  183. .B Save
  184. save the current board to
  185. .I /tmp/sudoku-save
  186. .TP
  187. .B Load
  188. load the last saved board from
  189. .I /tmp/sudoku-save
  190. .TP
  191. .B Print
  192. print the current board and solution in a format
  193. suitable for addition in the sudoku library to
  194. .I /tmp/sudoku-board
  195. .TP
  196. .B Offline
  197. pretty-print the board for off-line solving to
  198. .I /tmp/sudoku-print
  199. .TP
  200. .B Exit
  201. quit the game
  202. .RE
  203. .IP
  204. Button 2 presents a list of sudoku boards from
  205. .I /sys/games/lib/sudoku/boards
  206. with varying degree of difficulty.
  207. .IP
  208. Pressing the
  209. .B Q
  210. key quits sudoku
  211. .SH FILES
  212. .TP
  213. .B /sys/games/lib/[45]scores
  214. score files of
  215. .I 4s
  216. and
  217. .I 5s
  218. .TP
  219. .B /sys/games/lib/mahjongg/*
  220. image sprites, levels and backgrounds used by
  221. .I mahjongg
  222. .TP
  223. .B /sys/games/lib/sokoban/*
  224. image sprites and levels used by
  225. .I sokoban
  226. .TP
  227. .B /sys/games/lib/sudoku/*
  228. images and boards used by
  229. .I sudoku
  230. .SH SOURCE
  231. .B /sys/src/games
  232. .SH BUGS
  233. In 4s and 5s mouse warping (when the game is resumed,
  234. and when a new tile appears) does not happen when
  235. the mouse cursor is outside the game window.
  236. Those who prefer to use the keyboard without the mouse
  237. cursor blocking the view (or being warped all the time)
  238. may consider this a feature.