Giter Club home page Giter Club logo

golem's Introduction

Golem

This project is an implementation of the Go board game using the Elm programming language.

Usage

λ git clone https://github.com/zerovolts/golem.git
λ cd golem
λ elm-reactor

Then navigate to localhost:8000

Definitions

  • Connected - Two stones are connected if they are the same color and adjacent (not diagonal) to each other.
  • Chain - A set of one or more stones that are all connected to each other.
  • Liberties - Empty intersections surrounding a chain. If there are none, the chain is "captured" and removed from the board.
  • Territory - A chain of empty intersections. A territory is owned by black (for instance) if it is completely surrounded by black stones or the edge of the board.

Implemented Features

  • Stone Placement - Can place stones on any empty intersection (color alternates between black and white).
  • Capture - Any chains adjacent to the placed stone are removed if they no longer have any liberties.
  • Suicide Prevention - If placing a stone will immediately remove it from the board (after any captures), the move is blocked.
  • Territory Calculations - Territories are recalculated each turn and colored according to their respective owner.
  • End of Game Scoring - Once both players have passed, the game ends and the player with more territory wins.

Planned Features

  • Eye calculation - An empty point surrounded by one player's stones.
  • Life calculation - A chain is alive if it has 2 or more eyes.
  • Rule of Ko - Prevents the repetition of a position in which a single stone is captured, then immediately taken back.
  • Recolor or highlight the chain that is currently being hovered over.
  • Recolor or highlight any chains which are alive.
  • Seki - Prevents stones from being played in a "mutual life" area; Suicide calculation may need to be rewritten for this.
  • Superko - Repeating any previous board state is disallowed.

Screenshot

Game screenshot

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.