Connect Four CircleCICoverage StatusHex.pmHex.pm

A fast Connect Four game engine. Each game is a GenServer, making it well-suited as a foundation for a Connect Four platform, or generally for any scenario requiring the ability to simulating multiple games simultaneously.

See the ConnectFour.Game module functions for usage examples.

Implementation

Connect Four games are stored as bitboards, with a tiny bit of metadata. This allows for move validation to be as fast as a few bitwise operations.

For a walkthrough of how it works, see this excellent guide. You can also view the original Java implementation here.

Installation

Add to the dependencies in your mix.exs file.

def deps do
[
{:connect_four, "~> 0.1.4"}
]
end