GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MiLk/mountainfall: Browser-based SIAM board game — elephants vs rhinoceros pushing mountains off a 5x5 grid. Game logic runs in Prolog via WebAssembly.

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs/superpowers
docs/superpowers
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
HH.pl
HH.pl
 
 
README.md
README.md
 
 
ia.pl
ia.pl
 
 
index.html
index.html
 
 
og-image.png
og-image.png
 
 
og-image.svg
og-image.svg
 
 
plateau.pl
plateau.pl
 
 

Repository files navigation

Mountainfall

Elephants vs Rhinoceros — Push the Mountains

A browser-based implementation of the SIAM board game. Two players take turns placing and moving their animals on a 5x5 board, trying to push one of three mountains off the edge.

Play

Open index.html in any modern browser. No server or build step required.

The game logic runs in SWI-Prolog compiled to WebAssembly via swipl-wasm. The WASM engine (~10MB) loads from a CDN on first visit and is cached by the browser.

Rules

  • 5 elephants vs 5 rhinoceros on a 5x5 board with 3 mountains in the center.
  • On your turn, do one of: enter a piece from reserve, move one cell, rotate in place, or withdraw from an edge.
  • Every piece has a facing direction. A piece can push a line of pieces/mountains in its facing direction if it has more force than resistance.
  • Win by pushing a mountain off any edge of the board.

How it works

The original game logic is written in Prolog (plateau.pl). The browser version embeds this logic in index.html inside a <script type="text/prolog"> tag. SWI-Prolog WASM loads and executes it. JavaScript handles rendering (emoji pieces on a CSS grid) and user interaction, calling Prolog for move validation and board state updates.

Files

File Description
index.html Self-contained browser game (Prolog + JS + CSS)
plateau.pl Original Prolog game logic (authoritative source)
HH.pl Older version of the game logic
ia.pl AI opponent (not yet wired into the browser version)

Development

Requires SWI-Prolog for local testing of Prolog changes:

brew install swi-prolog
swipl -l plateau.pl -g jouer   # Play in terminal

To test the browser version locally, serve via HTTP (WASM requires it):

python3 -m http.server 8080
open http://localhost:8080/index.html

About

Browser-based SIAM board game — elephants vs rhinoceros pushing mountains off a 5x5 grid. Game logic runs in Prolog via WebAssembly.

milk.github.io/mountainfall/

Topics

gameprologsiamswi-prolog

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.