Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.85 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.85 KB

golang-chess

This project is written for improving my knowlegde in Go

How to install

After installing GO, clone this repository then in root of directory run :

go install

If you get NOTCE such as "no install location outside GOPATH", make sure you setted your GOPATH enviroment variable (in OSX and Linux, make sure you setted $GOBIN :

export GOBIN=$GOPATH/bin

Project Structure

Main project organization is inside src/ directory, include :

ai/

chess/

  • Handles the game engine (Eg: game state storage or piece movement, ...).
  • Contains helper functions that are entirely reliant on the rules of Chess, such as whether a given square on a board is occupied.

Folder assets contains all of files for displaying chess on browser (Thankfully chessboardjs for beautiful chess board, and chessjs for validating piece movement in client-side).

I'm used mux for implementing requests router and dispatchers as well as handling AJAX request from Go, make sure that it's installed, if not, run cmd go get from your root directory, see more details.

Testing

run go test inside root directory to ensure everything works

After all, run :

go build

brower will be opened immediately (Linux & Mac) , if you are using others, simply execute the output file has compiled.

Resources