Skip to content

A game where you have to draw houses fast enough to keep the little pig ahead of the hungry wolf who blows them up.

License

Notifications You must be signed in to change notification settings

SWI-PrologTeamLudumDare32/LudumDare45

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LudumDare45

This is a fork of PlayingWithProlog/cookingwithsnap

Install (assumes you have a recent SWI-Prolog)

  1. Download the latest Snap.zip from https://github.com/jmoenig/Snap/releases/tag/v5.1.0

  2. unzip in the Ludumdare45 directory, you'll get a directory Snap-5.1.0

run

  1. cd Ludumdare45/prolog

  2. swipl game.pl

  3. ?- go.

  4. load Snap-5.1.0/index.html into browser to get a default snap project

  5. Load the file ld45game.xml via the document icon in UI, or by drag and drop onto Snap UI.

  6. click the green flag

  7. Drag ingredients (for now just the egg) into the pan

Architecture

Snap! running in the browser sends HTTP requests to a SWI-Prolog server. The server formulates a pair of goals. The action goal to initiate change, and a return goal whose last argument is bound with the information to be returned to Snap!

These are passed via message queues to a dedicated thread that handles the CHR productions.

The result is passed back via another message queue and bound to the last argument.

Derived from

CHR server lifted from

https://github.com/fnogatz/CHR-Constraint-Server

About

A game where you have to draw houses fast enough to keep the little pig ahead of the hungry wolf who blows them up.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Prolog 100.0%