0 Members and 1 Guest are viewing this topic.

{7,21}->Dim Mat CFill(0, Mat C)1->XRanInt#(3,6)->Y0->A0->B0->KWhile X<22Y+RanInt#(-1,1)->YIf Y>7Then 7->YIfEndIf Y<2Then 2->YIfEndLocate X,Y,"()"1->Mat C[Y,X]For Y+1->I to 7 Step 1Locate X,I,"[]"2->Mat C[Y,X]NextX+1->XWhileEndLocate 1,2,"I"9->Mat C[2,1]1->X2->YWhile K!=47Locate 1,1,"()"Locate 2,1,ALocate 6,1,BLocate 5,1,"[]"If Mat C[Y+1,X]=0Then Locate X,Y," "0->Mat C[Y,X]Y+1->Y9->Mat C[Y,X]Locate X,Y,"I"IfEndGetkey->KIf K=38 And X>1 And Mat C[Y,X+1]=0Then 0->Mat C[Y,X+1]Locate X,Y," "X+1->X9->Mat C[Y,X]Locate X,Y,"I"IfEndIf K=27 And X<27 And Mat C[Y,X-1]=0Then 0->Mat C[Y,X-1]Locate X,Y," "X-1->X9->Mat C[Y,X]Locate X,Y,"I"IfEndWhileEnd

If K=27 And X<27 And Mat C[Y,X-1]=0

{7,21}->Dim Mat CFill(0, Mat C)1->XRanInt#(3,6)->Y0->A0->B0->KWhile X<22 Y+RanInt#(-1,1)->Y If Y>7 Then 7->Y IfEnd If Y<2 Then 2->Y IfEnd Locate X,Y,"()" 1->Mat C[Y,X] For Y+1->I to 7 Step 1 Locate X,I,"[]" 2->Mat C[Y,X] Next X+1->XWhileEndLocate 1,2,"I"9->Mat C[2,1]1->X2->YWhile K!=47 Locate 1,1,"()" Locate 2,1,A Locate 6,1,B Locate 5,1,"[]" If Mat C[Y+1,X]=0 Then Locate X,Y," " 0->Mat C[Y,X] Y+1->Y 9->Mat C[Y,X] Locate X,Y,"I" IfEnd Getkey->K If K=38 And X>1 And Mat C[Y,X+1]=0 Then 0->Mat C[Y,X+1] Locate X,Y," " X+1->X 9->Mat C[Y,X] Locate X,Y,"I" IfEnd If K=27 And X<27 And Mat C[Y,X-1]=0 Then 0->Mat C[Y,X-1] Locate X,Y," " X-1->X 9->Mat C[Y,X] Locate X,Y,"I" IfEndWhileEnd

For Y+1->I to 7 Step 1 Locate X,I,"[]" 2->Mat C[Y,X] Next

2->Mat C[I,X]

2->Mat C[Y,X]