GithubHelp home page GithubHelp logo

descramble's Introduction

Descramble

Introduction

Solver for "scramble", a facebook game or something from ~2009, I don't quite remember. The game presents a 4x4 grid of characters and the player must find words contained within that are made up of any connecting characters.

I created this to teach myself C and to beat my wife at the game. This is the first full program I've written in C, but should be good code, at least it does what it set out to do.

Wordlists

The program requires wordlists. They should be named words.NUM where NUM is a length from 3 though 8.

You can generate the necessary wordlists from your local dictionary using something like:

% for i in $(seq 3 8); do awk "length(\$0) == $i {print}" /usr/share/dict/words > words.$i; done

Usage

Assuming the game provides the grid:

a  b  c  d
e  f  g  h
i  j  k  l
m  n  o  p

Type out the grid as four blocks of four letters:

% ./descramble abcd efgh ijkl mnop
      fab      fie      fin     fink     fino     glop      ink      jin
     jink    knife     knop     koji      kop      lop     mink      nim
      pol    plonk
Found 18 words

Installation

To compile the program:

% cd /path/to/descramble.c
% make

Copy the file to somewhere like /usr/local/bin or just leave it where it is.

descramble's People

Watchers

Toby Oxborrow avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.