Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hoodscott/connect4

Connect 4 game made with Elm
https://github.com/hoodscott/connect4

elm

Last synced: about 1 month ago
JSON representation

Connect 4 game made with Elm

Awesome Lists containing this project

README

        

# Connect 4 made with Elm


screenshot of connect 4 game setup
screenshot of connect 4 game in progress
screenshot of connect 4 game win screen

## Can play:

- Human vs. Human
- Human vs. AI
- AI vs AI

## AIs implemented:

- Choose random column
- Simple minimax that looks for winning/losing games in the next n turns
- Choose middle column
- Choose least empty column (tries to stack pieces)
- Choose most empty columm (tries to spread pieces)

## Setup

Requires global install of Elm. Then run following commands to setup elm-live server on [localhost:8000](http://localhost:8000/):

```
npm i
npm run live
```

To build the app run either `.\build.cmd` or `./build.sh` depending on OS.