Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Grand Plan: Multiple player transfer chess. Current Status: Learning haskell

Notifications You must be signed in to change notification settings

tarnacious/chess

Repository files navigation

Description

Building out the "Learning Haskell with Chess" tutorial as a very slow chess engine. It can currently make moves (badly) and return possible moves.

ZeroMQ binding have been added so it can used by a socket server that coordinates players and games.

I intend to extend it to validate moves and eventually play "Transfer Chess".

Dependencies

Depends on the zeromq-haskell package.

Usage

An example of the format is parses and returns

$ cat start.json
{ 
  "Turn" : "White", 
  "Board" : [
            ["RB", "NB", "BB", "QB", "KB", "BB", "NB", "RB"], 
            ["PB", "PB", "PB", "PB", "PB", "PB", "PB", "PB"], 
            ["--", "--", "--", "--", "--", "--", "--", "--"], 
            ["--", "--", "--", "--", "--", "--", "--", "--"], 
            ["--", "--", "--", "--", "--", "--", "--", "--"], 
            ["--", "--", "--", "--", "--", "--", "--", "--"], 
            ["PW", "PW", "PW", "PW", "PW", "PW", "PW", "PW"], 
            ["RW", "NW", "BW", "QW", "KW", "BW", "NW", "RW"] 
            ]
}

Play a couple of moves from the shell. Output no longer pretty formated :(

$ cat start.json | runhaskell CliMove.hs | runhaskell CliMove.hs
{"Turn":"White","Board":[["RB","NB","BB","QB","KB","BB","NB","RB"],["PB","PB","PB","PB","PB","PB","PB","--"],["--","--","--","--","--","--","--","PB"],["--","--","--","--","--","--","--","--"],["--","--","--","--","--","--","--","--"],["--","--","--","--","--","NW","--","--"],["PW","PW","PW","PW","PW","PW","PW","PW"],["RW","NW","BW","QW","KW","BW","--","RW"]]}

Start a zmq client

$ runhaskell Client.hs

Start a zmq Server

$ runhaskell Server.hs

About

Grand Plan: Multiple player transfer chess. Current Status: Learning haskell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published