Giter VIP home page Giter VIP logo

hangman's Introduction

hangman

A simple digital version of the classic pen-and-paper Hangman word game, implemented in the esoteric programming language Ook!.

Overview

Apart from the Ook! program itself, this repo also includes an Ook! interpreter and two Python scripts that can be used to run the game:

  • hangman.ook – This is the actual implementation of the game. It is about as readable as Ook! code can be – it is structured, commented (unfortunately not in English, sorry), and each section of the code is accompanied with its translation to brainfuck (I found this very helpful, if not essential, to keep track of what is going on). At the top of the file, there is also a description (in English) of how the program works from a user's perspective (usage instructions, game rules).
  • hangman_minified.ook – The same program, in a "minified" form. No unnecessary comments or structuring, just the "Ook"s. You should find this version more readable, in the case you are an orangutan.
  • esco – The EsCo (Esoteric Combine) interpreter, in the form of a statically compiled x86-64 binary. It is able to interpret several esoteric languages, including Ook!.
  • play.py – Python script that uses the EsCo interpreter to run hangman.ook. Nothing more, nothing less.
  • play_against_words_file.py – Another Python script that runs hangman.ook using EsCo, but this one also selects a random word from a words file (/usr/share/dict/words by default) and provides it to the program as the word to guess. This results in an actual playable single-player Hangman game.

Demonstration

This is how playing a game looks (using the script play.py):

play.py demonstration

A note about Ook!

The author of the language says that "Ook! is a programming language designed for orang-utans" [1]. An unfortunate consequence of this, as I have found out, is that it probably shouldn't be used by humans. (It's just brainfuck, but with more masochism.)

hangman's People

Contributors

qwhxm avatar

Stargazers

 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.