f0nkey / bad-chess-bots

Play against chess bots in your browser that you can (probably) beat.

Home Page:https://f0nkey.github.io/bad-chess-bots/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bad-chess-bots

A bunch of bad chess bots that you can actually beat for once!

  • Written in Go
  • Compiled to WebAssembly
  • Inspired by this awesome video
  • Playable in the browser

Play Now

Bots

Bot Strategy
Random Plays random moves
Same Color Plays moves to the same color squares as its pieces
Opposite Color Plays moves to the opposite color square
Huddle Attempts to put its pieces as close as possible to its own king
Swarm Attempts to put its pieces as close as possible to the opposing king
Centrist Prefers placing pieces in the center

Building

This project requires TinyGo to be installed.

tinygo build -o ./docs/bots.wasm -target wasm ./

Testing

Opening the index.html on its own will not work since the proper Content-Type for bots.wasm will not be served. Use this command from the root to run a server properly serving bots.wasm

go run ./test-server/main.go

About

Play against chess bots in your browser that you can (probably) beat.

https://f0nkey.github.io/bad-chess-bots/

License:MIT License


Languages

Language:Go 100.0%