void FillPossibleStates() { //possibleStatesArray[0].a1 = 0; possibleStatesArray[0].a2 = 0; possibleStatesArray[0].outcome = 0; int i = 0; for (int a1 = 1; a1 < 4; a1++) { for (int a2 = 1; a2 < 4; a2++) { // for(int c = 1; c < 4; c++) //{ //print("Insert at i " + i + " a1: " + a1 + " a2: "); possibleStatesArray[i] = new StatesNode(a1, a2); i++; //} } } }
public override BaseNode VisitStates(CoronaParser.StatesContext context) { StatesNode node = new StatesNode(new List <string>(), new List <MemberNode>()); //Get the ids for the states foreach (var id in context.ID()) { node.Labels.Add(id.GetText()); } // Extract and visit StateNode children BuildMemberAst memberVisitor = new BuildMemberAst(); foreach (CoronaParser.MemberDeclarationContext member in context.memberDeclaration()) { node.Members.Add(memberVisitor.Visit(member)); } return(node); }