algebraic_to_coordinates: Convert algebraic notation to coordinates

View source: R/algebraic_to_coordinates.R

algebraic_to_coordinatesR Documentation

Convert algebraic notation to coordinates

Description

This function converts a square's algebraic notation (e.g., "e5") to a pair of coordinates (e.g., c(5, 5)).

Usage

algebraic_to_coordinates(square)

Arguments

square

A character string giving the algebraic notation of the square.

Value

A numeric vector of length 2 giving the coordinates of the square. The first element is the row number and the second element is the column number.

Examples

algebraic_to_coordinates("e5")  # Returns c(5, 5)

dryguy/rbitr documentation built on Oct. 15, 2024, 6:18 a.m.