8000 GitHub - macauleydev/chess: Ruby-powered terminal chess
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

macauleydev/chess

Repository files navigation

chess

A chess game in Ruby, designed and built from scratch (no tutorials).

screenshot02

Challenge undertaken as Ruby Final Project in The Odin Project's Ruby Course.

Features

Functionality:

  • Two humans can play in one terminal
  • Moves parsed from full coordinate notation (b1c3) or minimal algebraic notation (Nc3)
  • Can load a game from a file
  • Can save a game to a file
  • Each move is validated for legality (including non-endangerment of own King)
  • All single-piece moves (including captures) are supported
  • Check, checkmate, and draw are recognized and enforced
  • Architected to support complex moves (castling, pawn promotions)
  • Castling
  • Pawn promotions
  • Connect to a web API so human can play against a chess engine (e.g. Stockfish)

UI/UX:

  • Command-line interface
  • Chess board as colored squares
  • Chess pieces as black or white unicode symbols
  • Instructions shown contextually
  • Board and input prompt fixed on screen (scrolling suppressed)
  • Moves animated (path highlighted)
  • Move history shown above board in minimal algebraic notation
  • Description and feature list in README
  • Screenshots in README
  • Place move history right of board, in columns
  • Show captured pieces
  • Enable options to flip board (on-demand or per-turn)
  • Deploy demo using online terminal (e.g. OnlineGDB, Replit)
  • Deploy demo using a GUI (e.g. Chessboard.js)

Testing:

  • Improve method modularity and ordering
  • Distinguish public/private
  • Clarify what to test
  • Start making tests
  • Continue adding tests over time
    • Add random tests using imported PGN files from actual games

About

Ruby-powered terminal chess

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0