#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uc.DefineVariable("player1_position = 0");

   // Define a rule to translate the MOVE command
   auto t = uc.ExpressionTransformer();
   t.FromTo("PLAYER {@Number:p} MOVES {@Number:n} SPACES", "player{p}_position = player{p}_position + {n}");

   // Execute a single command
   uc.EvalStr("PLAYER 1 MOVES 5 SPACES");

   cout << "Player 1 is now at position: " << uc.EvalStr("player1_position") << endl;
}