parse_msweepeR_cmd: Function to parse user instructions

Description Usage Arguments Value See Also

View source: R/auxFunctions.R

Description

This function parses the msweepeR game command supplied by the user. This function is mainly used to update a msBoard object during a msweepeR game session.

Usage

1

Arguments

command

A character vector of length 1 containing the msweepeR game command supplied by the user during a msweepeR game session.

Value

This function returns a numeric vector of length < 5 containing a syntax representation of the command. The first element is a header that indicates whether an error ocurred while parsing the code. The second element, if no error ocurred, indicates the desired action to be applied on the msBoard (open a tile or put a flag), and finally the third and fourth elements (again, if no error ocurred while parsing) represent the tile coordinates where the action should take place. However, if there's an error header, the remaining elements of the vector contains information about the error.

See Also

msweepeR, msBoard, eval_msweepeR_cmd


pablorm296/msweepeR documentation built on Nov. 4, 2019, 11:16 p.m.