Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chess-charm

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chess-charm

Draw, make moves, visualize a chess board on your terminal

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chess-charm

chess-charm

var chessCharm = require('chess-charm');

var board = chessCharm()
    .showBoard()
    .setOpponent({name:'jamal',color:'black'})
    .setWhiteName({name:'Johannes',color:'white'})
    .showOpponent()
    .showPlayer();
    
    board
        .move('e2e4')
        .move('e7e5')
        .move('g1f3')
        .move('d7d6')
        .move('f1b5')
        .move('b8c6')
        .move('e1g1');

Draw chess positions, make moves, and see a chess board in beautiful ansi + unicode chess fonts!

Interactive!

Select with space bar

Select a piece with the arrow keys, and move the arrow keys to the piece's desired location,

Move with the "m" key

After you have a piece selected, then press m!

View this example in ./test.js

Methods

.move(movestring)

Updates the board with the move (given in Modified Standard Algebraic Notation)

.showBoard()

Shows the board as it currently stands.

.setPlayer({name:"foo",color:"black"})

Sets your player.

.setOpponent({name:'bar',color:'white'})

Sets the opponent.

Exit

Push "CTRL + C"

CREDITS

chess-charm was done in Charm by Substack

FAQs

Package last updated on 22 Sep 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc