kt_valid_move: Does the next position help make a knight's tour?

Description Usage Arguments Value

View source: R/01_Knights_Tour.R

Description

Can the proposed next position be appended to the given partial knight's tour to create a larger knight's tour (which may or may not be a complete knight's tour)?

Usage

1
kt_valid_move(position = position, solution)

Arguments

position

A numeric vector of length 2 describing the coordinates of the proposed next position on a chess board.

solution

A numeric 8x8 matrix describing the current partial solution on a chess board.

Value

TRUE if the proposed next position can be appended to the given partial knight's tour to form another knight's tour (which may or may not be a complete knight's tour). Otherwise FALSE.


jsphdms/backtrack documentation built on May 29, 2019, 1:24 p.m.