C# Class BalloonsPop.Validation.UserInputValidator

Concrete implementation of the IUserInputValidator interface, using regular expression.
Inheritance: IUserInputValidator
Datei anzeigen Open project: Baloons-Pop-4/Main

Public Methods

Method Description
IsValidUserMove ( string playerMove ) : bool

Returns true when the provided string is a valid player move.

Private Methods

Method Description
HasCorrectLength ( string playerMove ) : bool

Returns true if the player move has the appropriate length.

IsValidCommand ( string playerMove ) : bool

Returns true if the player move matches the specified pattern.

IsValidRowMove ( char playerMove ) : bool

Returns true if the row coordinate of the player move falls within the allowed range.

Method Details

IsValidUserMove() public method

Returns true when the provided string is a valid player move.
public IsValidUserMove ( string playerMove ) : bool
playerMove string The player move as string.
return bool