Stellingwerf   
Consulting   

Home
|
Services
|
Site Map
|
Email Us
Login

Game Scripts and Documents

These are some fun games that are also S program examples. See abstracts for descriptions.

Search current document page   |   Search all document pages

Order by:   Title   Author   Date  

Hide Abstracts

A-Z Word Finder
  Word Finder - Scrabble Help      Version: 1
Link to Document
words.s  
   
  Stellingwerf     July 2014
 Find all words containing specified letters between two strings of a given length. Letters are used once, and multiple letters must be in the letter list. Example in the script is length=7 range=aaaaaaa-zzzzzzz, letters=siretlh. Answer is "slither".

You must supply a dictionary="words.txt" consisting of a list of all allowable words, one per line, ACSII text file.
 
Mastermind Games
  MM.s
Link to Document
MM.s  
   
  Stellingwerf     July 2007
 This is the "normalized" version of "Mastermind".

A hidden string is generated, of a specified length, and a specified number of symbols. The symbols used here are 1,2,3,4,...etc. Defaults are length=5 and symbols=5. The following feedback is provided: 1) number of exact matches, 2) number of diagonal matches. See example on the "Games" page.

e.g. hidden string = 11222
guess = 22333 => matches = 0, diags = 6 .. (3 2s in string times 2 2s in guess)
guess = 12342 => matches = 2, diags = 6 .. (1 and second 2 match, lots of diagonal 2s and 3s)

The sum of the number of matches and diags = the sum over all the symbols of the number of occurrences in the guess times the occurrences in the target. So, if the guess has a limited number of symbols, this constraint gives some solid information about the target.
 
  MM2D.s
Link to Document
MM2D.S  
   
  Stellingwerf     July 2007
 A 2D version of Mastermind. Here an NxN array of numbers is generated, with M symbols. Defaults are N=3 and M=3. A guess of the entire array is made and the number of hits is displayed for each row and column. Again, the symbols are 1,2,3... , but in this case integer arithmetic is used to store and check the results. An option is included (type 0) to "give up" and see the hidden array.
 
RUBIK - puzzle simulators
  cube2.s
Link to Document
cube2.zip  
   
  Stellingwerf     July 2007
 2x2 cube. See 3x3 case for details. The file rot2.s contains needed subroutines.
 
  cube3.s
Link to Document
cube3.zip  
   
  Stellingwerf     July 2007
 The classic Rubik Cube. Zip file includes the cube.s driver, several subroutine libraries, and an assortment of move sequences. An external file macro.r can be inserted in a move sequence by using parens thus (macro)

Transforms are clockwise turns of each face:
(clockwise when looking at the face!)
(up,left,front,right,back,down)
u l f r b d

counter-clockwise turns are caps:
U L F R B D

Center slice moves are
*r *R *u *U *f *F

Rotate whole cube:
>r >R >u >U >f >F
 
  cube4.s
Link to Document
cube4.zip  
   
  Stellingwerf     July 2007
 4x4x4 Rubik cube. See cube3 notes for details.
 
  cube5.s
Link to Document
cube5.zip  
   
  Stellingwerf     July 2007
 5x5x5 cube. Moves same as cube3, with the addition of center slice moves
@r @R @u @U @f @F
 
  PYR.s - Pyramid Rubik Puzzle
Link to Document
PYR.zip  
   
  Stellingwerf     July 2007
 Tetrahedral Rubik simulator. See Notes.txt file in Zip folder, or notes in pyr.s itself for details.
 
SUDOKU
  Sudoku.s      Version: 1.9
Link to Document
sudoku.s  
Link to Document
chart1.txt  
 
  Stellingwerf     December 2007
 Read (an example, chart1.txt is supplied) or enter a SUDOKU puzzle. This program will assist you with a variety of hints, or solve the puzzle.
 


Back