1.0.5 • Published 2 years ago

knight-moves v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Knight Moves

Calculate the minimum number of moves needed for a chess knight to reach a given position. It provides a React component that will render an interactive chess board. This package is just for fun!

Installation

npm install knight-moves

Usage

The KnightMoves component requires the prop quadrantSize which accepts numbers between 5 and 15. The rendered board will be divided into quarters with the width and height of quadrantSize.

import React from 'react'
import { KnightMoves } from 'knight-moves'

export const KnightMovesDemo = () => {
  return <KnightMoves quadrantSize={15} />
}
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago