cat_interpreter library

Implementation of the CAT symbolic language. Is an interpreter that validates and executes the CAT Symbolic language.

Classes

BasicColoring
It's a class that allows you to color a shape
BasicMoves
A class that contains the basic moves of the CAT
BasicShape
It's an abstract class that defines the basic properties of a shape
CATInterpreter
This class is a Dart interpreter for the CAT language.
Coloring
It's a class that extends the BasicColoring class and adds a bunch of methods that color the cross in different ways
CommandCaller
It creates two lists of methods, one for the board and one for the move, and if the method name is in the list of methods, call the method.
Cross
Basic cross for the CAT interpreter
Results
It's a class that stores the results of the execution
Schemes
Contains a Map of Cross schemes build from a JSON String.
Square
Basic square for the CAT interpreter

Functions

schemesFromJson(String str) Schemes
Construct Schemes object starting from a JSON String.
splitByCurly(String command) List<String>
It removes the curly braces from the command, splits the command by commas, removes empty strings, and returns the result as a list
splitCommand(String command) List<String>
It splits a string into a list of strings, but it ignores commas and parentheses that are inside curly braces
splitCommands(String command) List<String>
It splits a string into a list of strings, where each string is a command

Enums

CatError
Creating an enumeration of all the possible errors that can occur in the game.
Shape
A factory that returns a BasicShape object.