Вверх ↑
Этот топик читают: Гость
Ответов: 632
Рейтинг: 4
#1: 2021-03-13 16:46:20 ЛС | профиль | цитата
Здравствуйте, подскажите как перебирать все возможные ходы в игре "Крестики-нолики".
Попыток много делал. Самая рабочая оказалось в лоб. Мне кажется можно как-то более умно сделать.
Каждый ход мне нужно сохранить в jpg файл. (ход x1-o2; ход х1-о3...)и сортировать в папки, но на 7 подпапке нужно в ней создать все ходы (не делать дальше подпапки).
То есть человек в итоге будет открывать папку (ход Х) от 1 до 9.
Дальше (ход О) и от 1 до 9, но с учётом прошлого хода и так до победы.

Add(MainForm,2953706,21,105)
{
Width=845
Height=588
Caption=""
BorderStyle=1
Position=1
}
Add(Image,7212893,546,168)
{
Left=20
Top=10
Width=400
Height=533
ViewStyle=1
link(Bitmap,2468126:Var3,[(552,156)(347,156)(347,177)])
}
Add(Bitmap,3599833,126,133)
{
HWidth=600
HHeight=800
Point(doCreate)
}
Add(Hub,4867429,63,154)
{
InCount=2
link(onEvent1,3599833:doCreate,[(101,160)(101,153)])
link(onEvent2,4013646:doData,[(89,167)(89,181)(30,181)(30,195)])
}
Add(Hub,5514291,518,175)
{
OutCount=3
link(onEvent1,7212893:doClear,[])
link(onEvent2,7212893:doLoad,[(539,188)(539,174)])
link(onEvent3,15144103:In,[(539,195)(539,244)])
}
Add(DoData,4013646,42,189)
{
link(onEventData,6062763:doDraw,[(82,195)(82,223)])
}
Add(Button,8452263,56,21)
{
Left=480
Top=70
link(onClick,4867429:doEvent1,[(100,27)(100,93)(51,93)(51,160)])
}
Add(Img_Loader,13449204,224,21)
{
link(FileName,13793102:Text,[(230,9)(195,9)(195,44)(160,44)])
}
Add(PictureStream,13644976,455,280)
{
link(Bitmap,7212893:ImageBitmap,[(468,219)(552,219)])
}
Add(Length,5722240,133,294)
{
link(onLength,3557442:doEvent,[(181,300)(181,307)])
}
Add(IndexToChanel,3557442,196,301)
{
Count=5
link(onEvent2,5361346:doStrCat,[(233,314)(233,272)])
link(onEvent3,5619946:doStrCat,[(244,321)(244,300)])
link(onEvent4,6753934:doStrCat,[])
link(onEvent5,2665378:doData,[(230,335)(230,363)])
}
Add(StrCat,6753934,252,322)
{
Str1="0"
link(onStrCat,11212095:doEvent3,[(296,328)(296,321)])
}
Add(DoData,2665378,252,357)
{
link(onEventData,11212095:doEvent4,[(296,363)(296,328)])
}
Add(StrCat,5619946,259,294)
{
Str1="00"
link(onStrCat,11212095:doEvent2,[(299,300)(299,314)])
}
Add(StrCat,5361346,252,266)
{
Str1="000"
link(onStrCat,11212095:doEvent1,[(296,272)(296,307)])
}
Add(Hub,11212095,308,301)
{
InCount=4
OutCount=1
link(onEvent1,6085050:doString,[(350,307)(350,314)])
}
Add(CounterEx,5344259,63,294)
{
Max=10000
Default=-1
link(onNext,5722240:doLength,[])
}
Add(Dir,3816417,413,259)
{
}
Add(FormatStr,6085050,378,308)
{
DataCount=3
Mask="%1%2%3.jpg"
link(onFString,13644976:doSave,[(446,314)(446,293)])
link(Str1,3816417:CurrentDir,[(384,300)(419,300)])
link(Str3,5344259:Count,[(398,296)(234,296)(234,338)(69,338)])
}
Add(Edit,13793102,154,0)
{
Left=455
Top=110
Width=180
Text=""
}
Add(Hub,7553089,147,35)
{
link(onEvent1,13449204:doLoad,[(181,41)(181,27)])
}
Add(Img_Line,6062763,91,217)
{
Size=3
Color=16777215
Point(Point1)
Point(Point2)
link(onDraw,6742388:doDraw,[])
link(Bitmap,16111056:Var1,[(97,177)])
link(Point1,13078512:Point,[(104,146)(97,146)])
link(Point2,12273281:Point,[(111,152)(139,152)])
}
Add(GetDataEx,16111056,126,172)
{
link(Data,3599833:Bitmap,[])
}
Add(PointXY,13078512,91,63)
{
X=200
Y=800
}
Add(PointXY,12273281,133,63)
{
X=200
}
Add(Img_Line,6742388,140,217)
{
Size=3
Color=16777215
Point(Point1)
Point(Point2)
link(onDraw,886538:doDraw,[])
link(Bitmap,12564887:Var2,[(146,199)(132,199)])
link(Point1,8875608:Point,[(153,159)(181,159)])
link(Point2,10269603:Point,[(160,159)(223,159)])
}
Add(PointXY,8875608,175,63)
{
X=400
Y=800
}
Add(PointXY,10269603,217,63)
{
X=400
}
Add(Img_Line,886538,189,217)
{
Size=3
Color=16777215
Point(Point1)
Point(Point2)
link(onDraw,10564010:doDraw,[])
link(Bitmap,2468126:Var2,[(195,199)(139,199)])
link(Point1,3799557:Point,[(202,156)(272,156)])
link(Point2,16124092:Point,[(209,156)(314,156)])
}
Add(Img_Line,10564010,238,217)
{
Size=3
Color=16777215
Point(Point1)
Point(Point2)
link(onDraw,10797862:doEvent1,[(282,223)(282,367)(-5,367)(-5,475)])
link(Bitmap,2468126:Var1,[(244,166)(139,166)])
link(Point1,16090449:Point,[(251,159)(377,159)])
link(Point2,66383:Point,[(258,159)(419,159)])
}
Add(GetDataEx,2468126,133,172)
{
Angle=3
link(Data,16111056:Var3,[])
}
Add(PointXY,3799557,266,63)
{
Y=266
}
Add(PointXY,16124092,308,63)
{
X=600
Y=266
}
Add(PointXY,16090449,371,70)
{
Y=533
}
Add(PointXY,66383,413,70)
{
X=600
Y=533
}
Add(LineBreak,7140158,7,308)
{
Primary=[15144103,539,-70]
}
Add(IndexToChanel,11202309,399,525)
{
Count=3
Point(Index)
link(onEvent2,6189239:doDraw,[(457,538)(457,496)])
link(onEvent3,11940439:doDraw,[])
}
Add(Img_Bmp,6189239,483,490)
{
X=2
Y=2
link(Bitmap,9237278:Var2,[])
link(SourceBitmap,3403021:Var2,[])
}
Add(Bitmap,9981130,434,371)
{
Picture=[ZIP3644000078DAED5BEB4F5439143F6757ECCCBAABBBAE3820E0023B20AE8020C338202BB3E08A80B2B3FD87C46862A2F183F193C6C4F888EF777C1B8D1A8CD168628C46E3231A351A5F9FFC03DC99B9AFB6B7BDB7BD974F1B9A109242FBFBF5F4F4F49CD37307D6645740B965A701B4147F8FDB3F0809EB0F79808999D64FB1D3FA29B6E6E666C86432D0DDDD0DB95C0E7A7A7A60787818D6AE5D0BE3E3E3B06EDD3A58BF7E3D6CD8B001366EDC089B366D82CD9B37C3962D5B60EBD6ADB06DDB36D8BE7D3BECD8B10376EEDC09BB76ED82DDBB77C39E3D7B60EFDEBDB06FDF3ED8BF7F3F1C3870000E1E3C08870E1D82C3870FC3912347E0E8D1A370ECD831387EFC389C3871024E9E3C09A74E9D82D3A74FC3993367E0ECD9B370EEDC39387FFE3C5CB870012E5EBC08972E5D82CB972FC3952B57E0EAD5AB70EDDA35B87EFD3ADCB87103262626E0E6CD9B70EBD62DB87DFB36DCB97307EEDEBD0BF7EEDD83FBF7EFC383070FE0E1C387F0E8D12378FCF8313C79F2049E3E7D0ACF9E3D83E7CF9FC38B172FE0E5CB97F0EAD52B78FDFA35BC79F306DEBE7D0BEFDEBD83F7EFDFC3870F1FE0E3C78FF0E9D327F8FCF9337CF9F205BE7EFD0ADFBE7D83A936D5A6DA549B6AFF8756310327692624B32BCC47B5D10C99140698A27496F9B004A5B46A1208603BA5B908F3E0FC2281CEB822C0E458711A1269685771244DC52280ADA539E6469B03474A83DB3186E28D966668883A03298DA663C988E3B1A53C7E69E405606D7902DA1A65064C0C950717626C2076580446CDD5109BACA1D174CF9D65C89EA5050D777ED01E586F36B0E21794A840B10D250C26C24667581372ACEAC20CE11C3AC2C91A6BA874AAE0C5E7E5F0458B324343E5395997CC97DD06F5B400EBA594912CA3B43B6C06AC12658D19773ADA881A8BEF93C3D7EA292376FA463204F26122C03A2A8347922BF554A3AED16165CD1208D66724BD72784B8B96E8EC5FE9BA1464CD11E8538B805156161E49D6C414381AC7C89A2340EB50B1F8A572F86ABB4BF72AC3319FAC7902BD3211B8303C3C922EBB6BB11A7EDA0FDCDF927E59F304680DFA169F91C357B97DACF4F167CE10CDE6AF18EBD6E6652D1058CA8B808161E19174B87D29F634FC4917083ACF9D2C1CF5CB5A2040E7B1F375CAE1535E5F1BF21A9EF0E93C7B3809335BAD8280EB9EB2301C7C9BD7B79A815FE037E6659D5FC8FCCF4266BE9C0D2412B0DD53C642B3F096E7E7B4246786E900CA747E3973E2564964ED2350744F7918067E11DBB90879EBE2B7044966458EFBEDB5ACC5CC4780A65AA90CDEF6FC9C368CAC532DBD476C9D5FE0FE67333F6FB582801CBE85EF253C7C3F2ABD5DEFC8E30A7E8EAEF21F420894E11DCFCF6DCEA26C78851D7674DEF1D60995A95B20010B5E901C5D29C02BAE30576836014C8BD32F0E2160C1E7C5EE04EF97F46198B3E910F0CD940D2460C1FF2D570977F501B7A0ABF33601DF0E041250C00F08F07518EEB3DB04B0C1808002DE5EAE0BDF1BE8BF0C0804966B1350C15B47DD850FF1413C895B04FC3BA020A082EF17E06B503370B00878038309A8E0ADE57AB36443FDEFBC4060990E01257CBDB008A2E9FE7A04243BE02360C1AFF4FF639F00AFE17FB3122F11102F770901E5EA0B027C46CBFFEE3324A00DAFE97FB312D720A00FAF994D73B21E7A04F4E13BB5E3E71E914095924042A57A3E78834408A7F3C11200DDD59B24F2B8382E94801EBC511A0FB3FA04F4E0C7CCD240BCD50922A007EFF9DF9A02A8F613902A21D1523DF30C2276E949806AC18F9AE72005BBAF4F40021F2507298A5B97800CBE2552FEB6230A0119FC50B40CB078F3EA1090C1F3A1B6D9BB8D2101297C53D404381BBF6B1190C20FC478BF18332220858F957F4F52030272F8C638EF477C12C1B1A3524B68BF73FC28F4FE333DD6F399CFFBFCA9D43BFD5FE56DF82B9D44F1330199DDD22A7783DAB9755F6092C7495C7E5A75E1061088A100E24283E1550422EF4039516700AF2030889323FD70780581E638CFAF46F00A02894938FB7AF07202912EC06424783981080E006FFB83CEBD0E0112EFEE53AEBE90D22360EA00F2774C5A1D6449EF020981D618FE7F3A28CCD02560140070BE5F20BC36019332006ECA10786D02060120D18647A2BF05DA01301BFBA483E3FB7A5AA94F40F310B2B15FC8EA4B196D7D029A091062B07A6A44402B01C4C4FE167C5F307C0081069180C60E30B98F34F2D50C0AF80002447833EA4603E9A75519E8828F978A405E7CB49A179AFFEDE1E1FD6F2012783581B44880E8E6FEEC918D5AF06A024478B80CA9C4233CBC44FA05855228080C8A2FA7810F00AEAEDBF0DE7B4818BC9240B3488068E4BE1DF8267D78258184F07A1EF000447878BFF483E055045689CFF7CA0730ECE7E17D862F185E45A045244082DF7E5C7821FCB0729801F02A024428E1503C80121EDE27FD6C28BC4D20B99AEF749D3F479FA40FC0B6AEBBF042F8611D9C10788B802F71D32A541FC876C0E6E6C1F3E1875583E183CFF5CA09240B94AAAB2F644139E16A4DC4F0C3EAF7C1D7225B6FC610108A42C684EA136F995CA83DCCD47FB07BB88C48E1CBDD6CBD1D4780F3E0DB85EA1B7107CA6FFF4C791AB783F31164F0F311A4FD0E01B244EEFC95AA8FC4A09CF07601E77A239DA21801A69F9115C9CB08F02791ABBE5A2806E57FD0D184BCFCA841BE4A3EAB225E930E01D22D77FE4ACCB8A0BC620EF7E7C5CEA8BF88147E402C80F3EA6D390280F3E4CE1F92FAEF34C20FEF34D687657485AA1397805714484CC38F15440ABF525E092C54DD54A2E8506674CB0F9788691B0E5E9D4BE0AB8E3C024E5168351A841FAB1252F891A00258BEEAAA12C5A258A22F7DB616AE5E5247A662D02A276019A9AC8600CAE1075BEFCEC06B7C09C095C3558AB3D4848F2F1D9836B614D2836FD3DBBF76A9D1B18C14D1907E212987D72E9FF52CFF080A462A153638C5E7093CF80EFD4F109872D02EDEE8FC1EFA1DD2F749941683987D09E459B0F9B13E9F215CED9F0901D7F22762C063C1C4704814B9D8D6C448FF67D9DA4FE3D1B6E5EF8EFCFCD740F5CE6C482AA13E62FABDEC83F4C4F900CCB6FC951859F76AE37E7E5617F5050673819F1AE88BA02FDA1758B3E29E5DD684CD341F56F11B99A4EF2F8BBE56054CB5A936D5FCED3F5BA50F8B]
HWidth=500
HHeight=500
}
Add(Bitmap,7399035,504,364)
{
Picture=[ZIP3644000078DAED5BCD4F144B10AF629BAF65D95D788BB0B0E82AA8A002B22CBBB0737921EFFAFE19F803246A4C2424E0950F133990F81163087A014C4820C6A837E3C910120E0442E04FE02D2CBB33D3D33DD3DD33B3F30E76B2D10C33F5ABAEAEAEAEAAAE9AF837F70F5C8E1C01E82BFE3B7DF5436828FDE16F809D68E9577C58FA15474F4F0F4C4C4CC0E4E4244C4D4DC1A3478F607A7A1A1E3F7E0C4F9E3C81A74F9FC2B367CFE0F9F3E730333303B3B3B330373707F3F3F3F0E2C50B58585880C5C545585A5A82E5E56578F9F225BC7AF50A565656607575155EBF7E0D6FDEBC81B76FDFC2BB77EFE0FDFBF7F0E1C307585B5B83F5F575F8F8F1237CFAF40936363660737313B6B6B6E0F3E7CFB0BDBD0D3B3B3BB0BBBB0B5FBE7C81AF5FBFC2B76FDFE0FBF7EFF0E3C70FF8F9F327FCFAF50B7EFFFE0D7B7B7BB0BFBF0F07070770787808474747707C7C0C272727707A7A0A676767707E7E0E7FC69FF167B81848088927B31A35B2C978F10FE83B76F3906633869AFDE3A1087E5F1318F76BFD6001430F34E1F120841E4F3D3AAE498DF1987742407257531877BDE100C5569DA909EE3940D2AFB9187D2E39C01B5CD299CE442C1226241C89B5758D705FBB816E269F6791CC26EA69537361941A3B0AACB7F3B5AA1CE01D06B5161B038324FC90C1C11D54DBF0631670E74D85A471D8C2C0988239B0AE7CBFA02E21B9ED5E0B90B67629094D4692B658449453BC9CF9F39B0D28A9B9BD14033919FEAF5904D82E2BC09A5B34896BA224B083A1C4920C60CA4AA243507F924C4322C5000B5ED392A8FCA91C033C1A29549DBD1403DC29384B80B9F6920CF0E11D7580A1F9D20CD8C13BED02E2709E0A30600FAF69C4EEDB9C26CAC0C589A70F1486D772286E74D90C14A1EB1319D3D3D16453890947781B536CE36C1819207D9CBFF4121480E71F4621CDED184C09BD16624F7F4CABD21843416FC7AFC1F2888856C5516B9D7EBE9AF87954D27DEF06BD0754A43F9C8847EAEA22F1C4B0C2C76633887D92F26B0D198C5ED120855A25D7AF0FD5A77F9BE5CBB1DC5E5101A04C88D9CDF3249174CB04A7A834FDEB767E2C92EB2A0240E1F87EC0C98B4632209C1F40C6F46FD97E22E0BF399E8069AB00A2FA115663F375412C8CC350C1063EDA50F96FACFCC1B881253EFB23C2FE2FF2D30151C3113D8EF4B99B46BEFC1E4AF8FFF890E3FB5CA80FA1CE6183D743F80B38221740322590B9A481FD664F48E7E7367235A82019FF61812F41629E2FB128248381906CFEC0EA4C0DA2E5A8AD35D9BE61E4EEA1947402C342E29E4E2266B481FAF41BB95F0F2864707080EBF298244ED827424A3466108B657A90E9EB140937B337989181EB6A092CC35990365368293F6F06ACE4F3C3DC05549ABE5100DD3C6F6708090F455FBF6EC50422765B54DFAA0084B7C389DBE9DB90C0AC15BF837AA597B24A2A02A87844BD148D44053FC6D87D1E4DDF86487DF9793CC97983705D751901E49DA8EB1769D41B4DE5E7AD6EF2F7AD652A4D1CFC2C4F424965CBCF3C05924EE10675BEE2A807CB6FC019A5C86768FC2E1FD4CF864C278DDFC6F970D8D5050E0E73F013347E8C83DFE6EEFE2AC1C18FD1F8110E7EDC1D7E9C831FA1F1C31CFC883BFC08073FEC9016ACE0D7B9C3AF73A2CFC988541D3F68F907AD7F41EFBF4475ED4F1B8DDF595DFBDBC58ECD7CC3A7CF9F11A78458A64AE72FCFFFF8AB4AFE47D2C943F3D9FFAA6C84FA6AFA9F8D956D4F9C36A02FFE7787D5FFCF222F23EB43FC51B0E2F34F085FE32F3DFEA43660BBE65DFC49A72FC27AFCA9C7DF2D3C780FE26F33037A7AAC9913E898E0BDC83F981870CC7F50F05EE45F8C0C341A21F5FC538C07EF49FE4927A11F8A973978CB0258E13DC9BF551870C8FFB1E03DC93F5E31A05BA5AB7CEB03D39D0C13DE9BFC6B8ACAB75EDD44874CEAD0AEF9977FBE6000D3F4A2EAF9F71472E1BDC9BF1719D0A75FCEBF1BEE1F1ADA357FEF1F52357A6154D46A0F6E6A7EDFBFDC6258B5A0EF9F82BE7F0BFCFE31E8FB57C39D4CB5EE9FFBD1FDFD7B5BE9FEBDCDFDFD7BE0F50741D75F54B9FE84FCFFEA6F82AE3F12ADBFEAB631B003620628E4A2FE2C8DD6DADE72904510D32ABA5F61C0B9FEEEF21EAF686F9A92A3C6C77AFD5D8F23099B5268C7FA4383E220A7FED0498D73281A3358C73D91F3FF9EF4D6337C6C5B7F3A28E6FF0CDAD170A8C2B6ABBF15F54079DEE7E52D9F630130B7FE3823EE7F66783492EAF5B33919FF3BA7EE3FF22420150313D5D97375202A17FF4455D6DE66174465E3BFA8ACE69B7D396A01D30DB2F80D6946E98FC4F76EFA4F8AFCA7C48DAEE86124DCCB85D60A69852E2CB5FEA32278CCE2C98DA9B5232AF45F9196BCA0B723264899FEB3FA4496E96ABA69C173ECBFABBDE8BF4B7466E49D0D511104DA7F0841F75F963808B2FFB4C48174FF6DD4E326E440FB8FCB7B4CACFFDAD716F0E0FACF0DA626C6EABF8F29F5DFFF07842C0AD7]
}
Add(GetDataEx,12564887,126,182)
{
link(Data,16111056:Var2,[])
}
Add(Resize,6915669,364,420)
{
Width=190
Height=250
Point(Result)
link(Bitmap,9981130:Bitmap,[(370,387)(405,387)(405,415)(440,415)])
}
Add(Resize,4897489,462,413)
{
Width=190
Height=250
Point(Result)
link(Bitmap,7399035:Bitmap,[(468,405)(510,405)])
}
Add(Hub,8932082,357,357)
{
link(onEvent1,6915669:doResize,[(383,363)(383,395)(352,395)(352,426)])
link(onEvent2,4897489:doResize,[(417,370)(417,419)])
}
Add(Img_Bmp,11940439,483,539)
{
X=2
Y=2
link(Bitmap,9237278:Var1,[(489,507)(480,507)(480,474)])
link(SourceBitmap,12144013:Var2,[(496,492)])
}
Add(GetDataEx,9237278,483,469)
{
link(Data,5773741:Var2,[])
}
Add(IndexToChanel,15961578,399,623)
{
Count=3
Point(Index)
link(onEvent2,4528983:doDraw,[(457,636)(457,594)])
link(onEvent3,5987853:doDraw,[])
}
Add(Img_Bmp,4528983,483,588)
{
X=202
Y=2
link(Bitmap,1980035:Var2,[(489,468)(480,468)])
link(SourceBitmap,8998274:Var2,[])
}
Add(Img_Bmp,5987853,483,637)
{
X=202
Y=2
link(Bitmap,1399337:Var2,[])
link(SourceBitmap,3772430:Var2,[])
}
Add(GetDataEx,3403021,490,469)
{
link(Data,5906729:Var2,[(496,464)])
}
Add(GetDataEx,12144013,462,483)
{
link(Data,5028515:Var2,[])
}
Add(GetDataEx,5773741,483,343)
{
link(Data,6317686:Var2,[])
}
Add(GetDataEx,1980035,474,343)
{
Angle=1
link(Data,5773741:Var1,[])
}
Add(IndexToChanel,9713590,399,700)
{
Count=3
Point(Index)
link(onEvent2,4031175:doDraw,[(457,713)(457,685)])
link(onEvent3,9610113:doDraw,[(457,720)(457,727)])
}
Add(Img_Bmp,4031175,483,679)
{
X=402
Y=2
link(Bitmap,4560154:Var2,[(489,650)(480,650)])
link(SourceBitmap,8998274:Var1,[(496,629)(487,629)(487,579)])
}
Add(Img_Bmp,9610113,483,721)
{
X=402
Y=2
link(Bitmap,4560154:Var3,[(489,617)(480,617)])
link(SourceBitmap,3772430:Var1,[(496,671)(487,671)(487,621)])
}
Add(GetDataEx,1399337,483,623)
{
link(Data,1189067:Var2,[])
}
Add(GetDataEx,4560154,474,623)
{
Angle=1
link(Data,1399337:Var1,[])
}
Add(GetDataEx,8998274,490,574)
{
link(Data,3403021:Var1,[(496,531)(487,531)(487,474)])
}
Add(GetDataEx,3772430,490,616)
{
link(Data,12144013:Var3,[(496,488)])
}
Add(IndexToChanel,8599390,595,525)
{
Count=3
Point(Index)
link(onEvent2,8491218:doDraw,[(653,538)(653,496)])
link(onEvent3,2443405:doDraw,[])
}
Add(Img_Bmp,8491218,679,490)
{
X=2
Y=268
link(Bitmap,227173:Var3,[(685,337)])
link(SourceBitmap,11390210:Var3,[(753,363)])
}
Add(Img_Bmp,2443405,679,539)
{
X=2
Y=268
link(Bitmap,8968859:Var3,[(685,440)])
link(SourceBitmap,15827760:Var3,[(786,460)])
}
Add(IndexToChanel,4469074,595,623)
{
Count=3
Point(Index)
link(onEvent2,2734407:doDraw,[(653,636)(653,594)])
link(onEvent3,13710405:doDraw,[])
}
Add(Img_Bmp,2734407,679,588)
{
X=202
Y=268
link(Bitmap,9418603:Var2,[(685,516)(678,516)])
link(SourceBitmap,16455957:Var2,[(692,484)(706,484)])
}
Add(Img_Bmp,13710405,679,637)
{
X=202
Y=268
link(Bitmap,31147:Var3,[(685,446)])
link(SourceBitmap,114925:Var2,[(692,551)(734,551)])
}
Add(IndexToChanel,8408404,595,707)
{
Count=3
Point(Index)
link(onEvent2,2210550:doDraw,[(653,720)(653,685)])
link(onEvent3,7018726:doDraw,[])
}
Add(Img_Bmp,2210550,679,679)
{
X=402
Y=268
link(Bitmap,266255:Var3,[(685,460)])
link(SourceBitmap,16455957:Var1,[(692,411)])
}
Add(Img_Bmp,7018726,679,721)
{
X=402
Y=268
link(Bitmap,9418603:Var3,[(685,467)])
link(SourceBitmap,7483046:Var2,[(692,593)(755,593)])
}
Add(GetDataEx,1189067,483,332)
{
Angle=3
link(Data,1980035:Var3,[(480,337)])
}
Add(GetDataEx,227173,672,332)
{
Angle=3
link(Data,1189067:Var3,[])
}
Add(GetDataEx,8968859,672,435)
{
link(Data,227173:Var2,[])
}
Add(GetDataEx,31147,672,441)
{
link(Data,8968859:Var2,[])
}
Add(GetDataEx,266255,672,455)
{
link(Data,31147:Var2,[])
}
Add(GetDataEx,9418603,672,462)
{
link(Data,266255:Var2,[])
}
Add(GetDataEx,5906729,364,455)
{
link(Data,6915669:Result,[])
}
Add(GetDataEx,5028515,462,455)
{
link(Data,4897489:Result,[])
}
Add(GetDataEx,10974683,700,371)
{
Angle=3
link(Data,5906729:Var3,[(538,376)(538,460)])
}
Add(GetDataEx,16455957,700,406)
{
link(Data,10974683:Var2,[])
}
Add(GetDataEx,114925,728,455)
{
Angle=3
link(Data,5028515:Var3,[])
}
Add(GetDataEx,7483046,749,455)
{
Angle=3
link(Data,114925:Var3,[])
}
Add(IndexToChanel,2892762,826,511)
{
Count=3
Point(Index)
link(onEvent2,10571968:doDraw,[(884,524)(884,482)])
link(onEvent3,2731954:doDraw,[])
}
Add(Img_Bmp,10571968,910,476)
{
X=2
Y=534
link(Bitmap,15993645:Var3,[(916,257)])
link(SourceBitmap,11095434:Var3,[(1013,315)])
}
Add(Img_Bmp,2731954,910,525)
{
X=2
Y=534
link(Bitmap,9197405:Var2,[(916,393)(846,393)])
link(SourceBitmap,12963338:Var3,[(1039,495)(1039,404)])
}
Add(IndexToChanel,981752,826,609)
{
Count=3
Point(Index)
link(onEvent2,5010183:doDraw,[(884,622)(884,580)])
link(onEvent3,4506756:doDraw,[])
}
Add(Img_Bmp,5010183,910,574)
{
X=202
Y=534
link(Bitmap,9518211:Var2,[(916,418)(853,418)])
link(SourceBitmap,13157160:Var2,[(923,446)(958,446)])
}
Add(Img_Bmp,4506756,910,623)
{
X=202
Y=534
link(Bitmap,8826243:Var2,[(916,442)(867,442)])
link(SourceBitmap,8570981:Var2,[(923,515)(979,515)])
}
Add(IndexToChanel,11768006,826,693)
{
Count=3
Point(Index)
link(onEvent2,7848880:doDraw,[(884,706)(884,671)])
link(onEvent3,6543877:doDraw,[])
}
Add(Img_Bmp,7848880,910,665)
{
X=402
Y=534
link(Bitmap,4310745:Var2,[(916,463)(881,463)])
link(SourceBitmap,11095434:Var2,[(923,492)(979,492)])
}
Add(Img_Bmp,6543877,910,707)
{
X=402
Y=534
link(Bitmap,15993645:Var2,[(916,484)(895,484)])
link(SourceBitmap,12963338:Var2,[(923,557)(1007,557)])
}
Add(GetDataEx,9796870,483,252)
{
link(Data,12564887:Var3,[(489,187)])
}
Add(GetDataEx,9197405,840,252)
{
Angle=3
link(Data,9796870:Var3,[])
}
Add(GetDataEx,9518211,847,252)
{
Angle=3
link(Data,9197405:Var3,[])
}
Add(GetDataEx,8826243,861,252)
{
Angle=3
link(Data,9518211:Var3,[])
}
Add(GetDataEx,4310745,875,252)
{
Angle=3
link(Data,8826243:Var3,[])
}
Add(GetDataEx,15993645,889,252)
{
Angle=3
link(Data,4310745:Var3,[])
}
Add(GetDataEx,11390210,721,364)
{
Angle=3
link(Data,10974683:Var3,[(716,369)(716,376)])
}
Add(GetDataEx,15827760,763,455)
{
Angle=3
link(Data,7483046:Var3,[])
}
Add(GetDataEx,13157160,952,310)
{
Angle=3
link(Data,11390210:Var2,[(727,315)])
}
Add(GetDataEx,8570981,973,399)
{
Angle=3
link(Data,15827760:Var2,[(769,404)])
}
Add(GetDataEx,11095434,973,310)
{
Angle=3
link(Data,13157160:Var3,[])
}
Add(GetDataEx,12963338,1001,399)
{
Angle=3
link(Data,8570981:Var3,[])
}
Add(IndexToChanel,11626168,287,476)
{
Count=10
Point(Index)
link(onEvent1,11202309:doEvent,[(359,482)(359,531)])
link(onEvent2,15961578:doEvent,[(359,489)(359,629)])
link(onEvent3,9713590:doEvent,[(359,496)(359,706)])
link(onEvent4,8599390:doEvent,[(457,503)(457,531)])
link(onEvent5,4469074:doEvent,[(457,510)(457,629)])
link(onEvent6,8408404:doEvent,[(457,517)(457,713)])
link(onEvent7,2892762:doEvent,[(551,524)(551,517)])
link(onEvent8,981752:doEvent,[(573,531)(573,615)])
link(onEvent9,11768006:doEvent,[(573,538)(573,699)])
link(Index,7634351:Index,[(293,464)(275,464)(275,520)(258,520)])
link(onEvent10,16584411:doEvent,[(464,545)(464,888)])
}
Add(Hub,10797862,35,469)
{
OutCount=5
link(onEvent1,4786934:In,[(70,475)(70,440)])
link(onEvent2,10897212:doClear,[(129,482)(129,433)])
link(onEvent3,3459917:doData,[(61,489)(61,507)(30,507)(30,524)])
link(onEvent4,7909290:doData,[(56,496)(56,580)])
link(onEvent5,2110865:doNext,[])
}
Add(LineBreak,3264653,315,364)
{
link(Out,8932082:doEvent1,[(351,370)(351,363)])
Primary=[4786934,-238,70]
}
Add(StrList,14952961,154,420)
{
Strings=#19:1-0-0-0-0-0-0-0-0-0|19:1-2-0-0-0-0-0-0-0-0|19:1-2-1-0-0-0-0-0-0-0|19:1-2-1-2-0-0-0-0-0-0|19:1-2-1-2-1-0-0-0-0-0|19:1-2-1-2-1-2-0-0-0-0|19:1-2-1-2-1-2-1-0-0-1|19:0-1-0-0-0-0-0-0-0-0|19:2-1-0-0-0-0-0-0-0-0|19:2-1-1-0-0-0-0-0-0-0|19:2-1-1-2-0-0-0-0-0-0|19:2-1-1-2-1-0-0-0-0-0|19:2-1-1-2-1-2-0-0-0-0|19:2-1-1-2-1-2-1-0-0-1|19:0-0-1-0-0-0-0-0-0-0|19:2-0-1-0-0-0-0-0-0-0|19:2-1-1-0-0-0-0-0-0-0|19:2-1-1-2-0-0-0-0-0-0|19:2-1-1-2-1-0-0-0-0-0|19:2-1-1-2-1-2-0-0-0-0|19:2-1-1-2-1-2-1-0-0-1|19:0-0-0-1-0-0-0-0-0-0|19:2-0-0-1-0-0-0-0-0-0|19:2-1-0-1-0-0-0-0-0-0|19:2-1-2-1-0-0-0-0-0-0|19:2-1-2-1-2-0-0-0-0-0|19:2-1-2-1-2-1-0-0-0-0|19:2-1-2-1-2-1-2-0-0-2|19:0-0-0-0-1-0-0-0-0-0|19:2-0-0-0-1-0-0-0-0-0|19:2-1-0-0-1-0-0-0-0-0|19:2-1-2-0-1-0-0-0-0-0|19:2-1-2-1-1-0-0-0-0-0|19:2-1-2-1-1-2-0-0-0-0|19:2-1-2-1-1-2-1-0-0-0|19:2-1-2-1-1-2-1-2-0-0|19:2-1-2-1-1-2-1-2-1-0|19:0-0-0-0-0-1-0-0-0-0|19:2-0-0-0-0-1-0-0-0-0|19:2-1-0-0-0-1-0-0-0-0|19:2-1-2-0-0-1-0-0-0-0|19:2-1-2-1-0-1-0-0-0-0|19:2-1-2-1-2-1-1-0-0-0|19:2-1-2-1-2-1-1-2-0-0|19:2-1-2-1-2-1-1-2-1-0|19:0-0-0-0-0-0-1-0-0-0|19:0-0-0-0-0-0-0-1-0-0|19:0-0-0-0-0-0-0-0-1-0|
Point(EndIdx)
}
Add(Str_Enum,4918264,189,511)
{
Delimiter="-"
link(onEnum,10897212:doAdd,[(233,517)(233,471)(198,471)(198,426)])
link(onEndEnum,7634351:doEnum,[(233,524)(233,482)])
}
Add(StrList,10897212,210,420)
{
}
Add(CounterEx,2110865,98,497)
{
Max=1
Default=-1
Point(doMax)
Point(doMin)
link(onNext,8171103:doRead,[(138,503)(138,517)])
}
Add(DoData,3459917,42,518)
{
link(onEventData,2110865:doMax,[(86,524)(86,510)])
link(Data,14952961:EndIdx,[(48,485)(181,485)])
}
Add(ArrayRW,8171103,147,511)
{
link(onRead,4918264:doEnum,[])
link(Array,14952961:Array,[(153,481)(174,481)])
}
Add(ArrayEnum,7634351,245,476)
{
link(onItem,11626168:doEvent,[])
link(onEndEnum,5514291:doEvent1,[(397,489)(397,181)])
link(Array,10897212:Array,[(251,464)(230,464)])
}
Add(Img_Text,3619330,700,882)
{
X=10
Y=200
Font=[MS Sans Serif,90,0,8421504,1]
link(Bitmap,7610419:Var2,[])
}
Add(GetDataEx,6317686,483,308)
{
link(Data,9796870:Var2,[])
}
Add(IndexToChanel,16584411,525,882)
{
Count=3
link(onEvent2,7396232:doData,[(576,895)(576,888)])
link(onEvent3,11483246:doData,[(569,902)(569,923)])
}
Add(DoData,7396232,588,882)
{
Data=String(Победа Х)
link(onEventData,2616450:doEvent1,[])
}
Add(DoData,11483246,581,917)
{
Data=String(Победа О)
link(onEventData,2616450:doEvent2,[(621,923)(621,895)])
}
Add(Hub,2616450,630,882)
{
InCount=2
OutCount=1
link(onEvent1,12595910:doDraw,[(651,888)(651,895)])
}
Add(Img_Rectangle,12595910,658,889)
{
Style=1
Point(Point1)
Point(Point2)
link(onDraw,3619330:doDraw,[(695,895)(695,888)])
link(Bitmap,7610419:Var1,[(664,824)])
link(Point1,191378:Point,[(678,881)(622,881)])
link(Point2,8328913:Point,[(685,870)(664,870)])
}
Add(PointXY,191378,616,840)
{
link(X,13880157:Value,[(622,828)(584,828)(584,856)(545,856)])
link(Y,4059070:Value,[(629,828)(594,828)])
}
Add(PointXY,8328913,658,833)
{
link(X,8800729:Value,[(664,821)(671,821)])
link(Y,4657509:Value,[(671,807)(720,807)])
}
Add(Memory,13880157,539,812)
{
Default=Integer(8)
}
Add(Memory,4059070,588,784)
{
Default=String(200)
}
Add(Memory,8800729,665,777)
{
Default=Integer(590)
}
Add(Memory,4657509,714,749)
{
Default=Integer(350)
}
Add(GetDataEx,7610419,700,819)
{
link(Data,6317686:Var3,[(706,313)])
}
Add(Edit,3245982,14,609)
{
Left=530
Top=165
Text="0"
}
Add(DoData,7909290,63,574)
{
link(onEventData,2110865:doMin,[(97,580)(97,517)])
link(Data,3245982:Text,[(69,562)(45,562)(45,653)(20,653)])
}


Редактировалось 1 раз(а), последний 2021-03-13 16:46:42
карма: 0

0
Ответов: 8923
Рейтинг: 823
#2: 2021-03-13 23:49:21 ЛС | профиль | цитата
Vadimluk1, там их (вариантов) 9!=362880 шт Вот схемка. На выходе текстовой файл в формате
#########;#####;####; где
Первая колонка 9 цифр -- очерёдность заполнения игроками клеточек поля
Вторая колонка 5 цифр -- ходы 1-го игрока
третья колонка 4 цифры -- ходы 2-го игрока
схема


Add(MainForm,2953706,84,77)
{
Height=298
}
Add(Memory,8586173,210,84)
{
Default=String(123456789)
}
Add(Button,4794150,42,189)
{
Left=15
Top=10
Caption=">>"
link(onClick,14483491:doEvent1,[])
}
Add(ListBox,626462,812,322)
{
Left=120
Top=5
Width=240
Height=250
Point(doSave)
}
Add(For,937194,119,196)
{
Start=1
End=9
link(onEvent,8955840:doEvent1,[])
link(onStop,1867074:doData,[(158,209)(158,349)])
}
Add(For,15032230,266,196)
{
Start=1
End=8
link(onEvent,9874744:doEvent1,[])
}
Add(For,5153321,413,196)
{
Start=1
End=7
link(onEvent,1460964:doEvent1,[])
}
Add(For,505564,560,196)
{
Start=1
End=6
link(onEvent,8862435:doEvent1,[])
}
Add(For,5084940,707,196)
{
Start=1
End=5
link(onEvent,14337298:doEvent1,[])
}
Add(For,13771652,854,196)
{
Start=1
End=4
link(onEvent,3771135:doEvent1,[])
}
Add(For,12372847,1001,196)
{
Start=1
End=3
link(onEvent,11720629:doEvent1,[])
}
Add(Hub,8955840,189,196)
{
link(onEvent1,1542147:doCopy,[(214,202)(214,188)(109,188)(109,153)])
link(onEvent2,15032230:doFor,[(242,209)(242,202)])
}
Add(Hub,9874744,336,196)
{
link(onEvent1,14926235:doCopy,[(361,202)(361,188)(256,188)(256,153)])
link(onEvent2,5153321:doFor,[(375,209)(375,202)])
}
Add(Hub,1460964,483,196)
{
link(onEvent1,13197112:doCopy,[(508,202)(508,188)(403,188)(403,153)])
link(onEvent2,505564:doFor,[(538,209)(538,202)])
}
Add(Hub,8862435,630,196)
{
link(onEvent1,6041627:doCopy,[(655,202)(655,188)(550,188)(550,153)])
link(onEvent2,5084940:doFor,[(697,209)(697,202)])
}
Add(Hub,14337298,777,196)
{
link(onEvent1,14378675:doCopy,[(809,202)(809,188)(697,188)(697,153)])
link(onEvent2,13771652:doFor,[(822,209)(822,202)])
}
Add(Hub,3771135,924,196)
{
link(onEvent1,14925969:doCopy,[(949,202)(949,188)(844,188)(844,153)])
link(onEvent2,12372847:doFor,[(949,209)(949,202)])
}
Add(Hub,11720629,1071,196)
{
link(onEvent1,11174019:doCopy,[(1096,202)(1096,188)(991,188)(991,153)])
link(onEvent2,3964517:doFor,[(1131,209)(1131,202)])
}
Add(Memory,13611596,133,77)
{
Default=Integer(1)
}
Add(Memory,8961364,357,84)
{
Default=String()
}
Add(GetDataEx,5741733,210,119)
{
link(Data,8586173:Value,[])
}
Add(Copy,1542147,119,147)
{
Count=1
link(onCopy,16006820:doValue,[])
link(Str,5741733:Var1,[(125,124)])
link(Position,11853312:Var1,[(132,138)])
link(Count,459717:Var2,[])
}
Add(Memory,16006820,168,147)
{
link(onData,12967616:doDelete,[])
}
Add(Delete,12967616,210,147)
{
link(onDelete,8961364:doValue,[(249,153)(249,90)])
link(Str,5741733:Var2,[])
link(Position,11853312:Var3,[(223,138)])
link(Count,12223103:Var2,[])
}
Add(GetDataEx,11853312,161,133)
{
Angle=2
link(Data,937194:Position,[(167,242)(125,242)])
}
Add(GetDataEx,459717,133,126)
{
link(Data,13611596:Value,[])
}
Add(Copy,14926235,266,147)
{
Count=1
link(onCopy,3255379:doValue,[])
link(Str,14926893:Var1,[(272,124)])
link(Position,10900635:Var1,[(279,137)])
link(Count,8878350:Var2,[])
}
Add(Memory,3255379,315,147)
{
link(onData,12585867:doDelete,[])
}
Add(Delete,12585867,357,147)
{
link(onDelete,8643631:doValue,[(396,153)(396,90)])
link(Str,14926893:Var2,[])
link(Position,10900635:Var3,[(370,137)])
link(Count,2218627:Var2,[])
}
Add(GetDataEx,14926893,357,119)
{
link(Data,8961364:Value,[])
}
Add(GetDataEx,12223103,224,126)
{
Angle=3
link(Data,459717:Var3,[])
}
Add(GetDataEx,8878350,280,126)
{
Angle=3
link(Data,12223103:Var3,[])
}
Add(GetDataEx,10900635,301,132)
{
Angle=2
link(Data,15032230:Position,[(307,237)(272,237)])
}
Add(Memory,8643631,504,84)
{
Default=String()
}
Add(Copy,13197112,413,147)
{
Count=1
link(onCopy,4438040:doValue,[])
link(Str,9244676:Var1,[(419,124)])
link(Position,7561411:Var1,[(426,137)])
link(Count,16449176:Var2,[])
}
Add(Memory,4438040,462,147)
{
link(onData,8584444:doDelete,[])
}
Add(Delete,8584444,504,147)
{
link(onDelete,12833701:doValue,[(543,153)(543,90)])
link(Str,9244676:Var2,[])
link(Position,7561411:Var3,[(517,137)])
link(Count,2615921:Var2,[])
}
Add(GetDataEx,9244676,504,119)
{
link(Data,8643631:Value,[])
}
Add(GetDataEx,7561411,448,132)
{
Angle=2
link(Data,5153321:Position,[(454,236)(419,236)])
}
Add(GetDataEx,2218627,371,126)
{
Angle=3
link(Data,8878350:Var3,[])
}
Add(GetDataEx,16449176,427,126)
{
Angle=3
link(Data,2218627:Var3,[])
}
Add(Memory,12833701,651,84)
{
Default=String()
}
Add(Copy,6041627,560,147)
{
Count=1
link(onCopy,12177004:doValue,[])
link(Str,8719570:Var1,[(566,124)])
link(Position,8617012:Var1,[(573,137)])
link(Count,15102060:Var2,[])
}
Add(Memory,12177004,609,147)
{
link(onData,14878231:doDelete,[])
}
Add(Delete,14878231,651,147)
{
link(onDelete,9193454:doValue,[(690,153)(690,90)])
link(Str,8719570:Var2,[])
link(Position,8617012:Var3,[(664,137)])
link(Count,367841:Var2,[])
}
Add(GetDataEx,8719570,651,119)
{
link(Data,12833701:Value,[])
}
Add(GetDataEx,15102060,574,126)
{
Angle=3
link(Data,2615921:Var3,[])
}
Add(GetDataEx,8617012,595,132)
{
Angle=2
link(Data,505564:Position,[(601,236)(566,236)])
}
Add(Memory,9193454,798,84)
{
Default=String()
}
Add(Copy,14378675,707,147)
{
Count=1
link(onCopy,14239043:doValue,[])
link(Str,3349704:Var1,[(713,124)])
link(Position,13645675:Var1,[(720,137)])
link(Count,871589:Var2,[])
}
Add(Memory,14239043,756,147)
{
link(onData,1492374:doDelete,[])
}
Add(Delete,1492374,798,147)
{
link(onDelete,6719118:doValue,[(837,153)(837,90)])
link(Str,3349704:Var2,[])
link(Position,13645675:Var3,[(811,137)])
link(Count,13670687:Var2,[])
}
Add(GetDataEx,3349704,798,119)
{
link(Data,9193454:Value,[])
}
Add(GetDataEx,871589,721,126)
{
Angle=3
link(Data,367841:Var3,[])
}
Add(GetDataEx,13645675,742,132)
{
Angle=2
link(Data,5084940:Position,[(748,236)(713,236)])
}
Add(Memory,6719118,945,84)
{
Default=String()
}
Add(Copy,14925969,854,147)
{
Count=1
link(onCopy,10328643:doValue,[])
link(Str,1479001:Var1,[(860,124)])
link(Position,1128297:Var1,[(867,137)])
link(Count,1588853:Var2,[])
}
Add(Memory,10328643,903,147)
{
link(onData,7733489:doDelete,[])
}
Add(Delete,7733489,945,147)
{
link(onDelete,2159667:doValue,[(984,153)(984,90)])
link(Str,1479001:Var2,[])
link(Position,1128297:Var3,[(958,137)])
link(Count,12567870:Var2,[])
}
Add(GetDataEx,1479001,945,119)
{
link(Data,6719118:Value,[])
}
Add(GetDataEx,1588853,868,126)
{
Angle=3
link(Data,13670687:Var3,[])
}
Add(GetDataEx,1128297,889,132)
{
Angle=2
link(Data,13771652:Position,[(895,236)(860,236)])
}
Add(GetDataEx,13670687,812,126)
{
Angle=3
link(Data,871589:Var3,[])
}
Add(GetDataEx,2615921,518,126)
{
Angle=3
link(Data,16449176:Var3,[])
}
Add(GetDataEx,367841,665,126)
{
Angle=3
link(Data,15102060:Var3,[])
}
Add(Memory,2159667,1092,84)
{
Default=String()
}
Add(Copy,11174019,1001,147)
{
Count=1
link(onCopy,3622036:doValue,[])
link(Str,3384574:Var1,[(1007,124)])
link(Position,13221054:Var1,[(1014,137)])
link(Count,6638824:Var2,[])
}
Add(Memory,3622036,1050,147)
{
link(onData,12863872:doDelete,[])
}
Add(Delete,12863872,1092,147)
{
link(onDelete,6542889:doValue,[(1131,153)(1131,90)])
link(Str,3384574:Var2,[])
link(Position,13221054:Var3,[(1105,137)])
link(Count,4039895:Var2,[])
}
Add(GetDataEx,3384574,1092,119)
{
link(Data,2159667:Value,[])
}
Add(GetDataEx,6638824,1015,126)
{
Angle=3
link(Data,12567870:Var3,[])
}
Add(GetDataEx,13221054,1036,132)
{
Angle=2
link(Data,12372847:Position,[(1042,236)(1007,236)])
}
Add(GetDataEx,12567870,959,126)
{
Angle=3
link(Data,1588853:Var3,[])
}
Add(For,3964517,1106,196)
{
Start=1
End=2
link(onEvent,1675336:doCopy,[(1145,202)(1145,153)])
}
Add(Memory,6542889,1246,84)
{
Default=String()
}
Add(Copy,1675336,1155,147)
{
Count=1
link(onCopy,5878084:doValue,[])
link(Str,6731347:Var1,[(1161,124)])
link(Position,13584055:Var1,[(1168,137)])
link(Count,15422984:Var2,[])
}
Add(Memory,5878084,1204,147)
{
link(onData,6774310:doDelete,[])
}
Add(Delete,6774310,1246,147)
{
link(onDelete,9722156:doString,[(1285,153)(1285,272)(648,272)(648,293)])
link(Str,6731347:Var2,[])
link(Position,13584055:Var3,[(1259,137)])
link(Count,15422984:Var3,[(1266,131)])
}
Add(GetDataEx,6731347,1246,119)
{
link(Data,6542889:Value,[])
}
Add(GetDataEx,15422984,1169,126)
{
Angle=3
link(Data,4039895:Var3,[])
}
Add(GetDataEx,13584055,1190,132)
{
Angle=2
link(Data,3964517:Position,[(1196,236)(1112,236)])
}
Add(GetDataEx,4039895,1106,126)
{
Angle=3
link(Data,6638824:Var3,[])
}
Add(FormatStr,9722156,658,287)
{
DataCount=9
Mask="%1%2%3%4%5%6%7%8%9;%1%3%5%7%9;%2%4%6%8;"
link(onFString,9568385:doAdd,[])
link(Str1,16006820:Value,[(664,264)(174,264)])
link(Str2,3255379:Value,[(671,257)(321,257)])
link(Str3,4438040:Value,[(678,250)(468,250)])
link(Str4,12177004:Value,[(685,243)(615,243)])
link(Str5,14239043:Value,[(692,243)(762,243)])
link(Str6,10328643:Value,[(699,250)(909,250)])
link(Str7,3622036:Value,[(706,257)(1056,257)])
link(Str8,5878084:Value,[(713,264)(1210,264)])
}
Add(Button,16607587,651,350)
{
Left=15
Top=200
Caption="Save"
link(onClick,92800:doExecute,[])
}
Add(SDialog,92800,700,350)
{
Filter="TXT|*.txt"
FileName="КрестНоль.txt"
link(onExecute,626462:doSave,[])
}
Add(StrList,9568385,749,287)
{
}
Add(Hub,14483491,84,189)
{
link(onEvent1,9568385:doClear,[(109,195)(109,300)])
link(onEvent2,937194:doFor,[])
}
Add(DoData,1867074,749,343)
{
link(onEventData,626462:doText,[])
link(Data,9568385:Text,[])
}

Клеточки пронумерованы так:
123
456
789
карма: 19

0
Ответов: 632
Рейтинг: 4
#3: 2021-03-14 01:03:55 ЛС | профиль | цитата
Леонид, спасибо,может некоторые ходы уберу.
карма: 0

0
Ответов: 8923
Рейтинг: 823
#4: 2021-03-16 18:27:19 ЛС | профиль | цитата
Vadimluk1 писал(а):
некоторые ходы уберу

Хотя число возможных комбинаций крестиков и ноликов гораздо меньше (126), но подойти к каждой при игре можно сотнями способами и выкидывать ходы не надо
Вот программка, откройте в ней полученный в предыдущей программе текстовой файл и она добавит ещё две колонки -- четвёртая колонка чей выигрыш (1-ый или 2-ой игрок, а 0 -- ничья), а пятая колонка на каком ходу завершится игра (5 --9 ход).


Add(MainForm,2953706,357,168)
{
Left=200
Top=50
Width=243
Height=544
link(onCreate,6238456:doStart,[(396,188)(396,223)(347,223)(347,237)])
}
Add(StrList,1914584,287,154)
{
link(FileName,2487976:Value,[])
}
Add(Button,1715518,154,238)
{
Left=80
Top=10
Caption=">>"
link(onClick,15357628:doFor,[])
}
Add(ArrayRW,1461964,301,238)
{
link(onRead,6238456:doParse,[])
link(Array,1914584:Array,[])
link(Index,15357628:Position,[(314,229)(257,229)(257,278)(216,278)])
}
Add(Hub,2054965,245,140)
{
link(onEvent1,11364811:doWork3,[(277,146)])
link(onEvent2,1914584:doLoad,[(277,153)(277,188)])
}
Add(InlineCode,6238456,357,231)
{
WorkPoints=#7:doStart|7:doParse|
EventPoints=#5:onRes|
DataPoints=#3:Str|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|33: Gain: Array[0..7] of integer;|9: public|26: _data_Data:THI_Event;|19: Str:THI_Event;|22: onRes: THI_Event;|52: procedure doStart(var _Data:TData; Index:Word);|49: procedure doParse(var _Data:TData; Index:Word);|0:|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|14:var i:integer;|5:begin|31: for i:=0 to 7 do Gain[i]:=0; |4:end;|0:|30:procedure THiAsmClass.doParse;|27:var s,ss,ss1,ss2,st:string;|26: i,j,k,n,m,sum:integer;|5:begin|33: st:=ReadString(_Data, Str, '');|24: if st = '' then Exit;|20: ss:=Copy(st,1,9); |21: ss1:=Copy(st,11,5);|21: ss2:=Copy(st,17,4);|32: for i:=0 to 7 do Gain[i]:=0; |19: for i:=1 to 3 do|74: begin |56: if ss1[i] in ['1','2','3'] then Gain[0]:=Gain[0]+1;|56: if ss1[i] in ['4','5','6'] then Gain[1]:=Gain[1]+1;|56: if ss1[i] in ['7','8','9'] then Gain[2]:=Gain[2]+1;|56: if ss1[i] in ['1','4','7'] then Gain[3]:=Gain[3]+1;|56: if ss1[i] in ['2','5','8'] then Gain[4]:=Gain[4]+1;|56: if ss1[i] in ['3','6','9'] then Gain[5]:=Gain[5]+1;|56: if ss1[i] in ['1','5','9'] then Gain[6]:=Gain[6]+1;|56: if ss1[i] in ['3','5','7'] then Gain[7]:=Gain[7]+1;|5: end;|18: for i:=0 to 7 do|8: begin|22: if Gain[i]=3 then|8: begin|35: _hi_onEvent(onRes, st + '1;5');|12: Exit;|10: end;|7: end;|3: |32: for i:=0 to 7 do Gain[i]:=0; |19: for i:=1 to 3 do|74: begin |56: if ss2[i] in ['1','2','3'] then Gain[0]:=Gain[0]+1;|56: if ss2[i] in ['4','5','6'] then Gain[1]:=Gain[1]+1;|56: if ss2[i] in ['7','8','9'] then Gain[2]:=Gain[2]+1;|56: if ss2[i] in ['1','4','7'] then Gain[3]:=Gain[3]+1;|56: if ss2[i] in ['2','5','8'] then Gain[4]:=Gain[4]+1;|56: if ss2[i] in ['3','6','9'] then Gain[5]:=Gain[5]+1;|56: if ss2[i] in ['1','5','9'] then Gain[6]:=Gain[6]+1;|56: if ss2[i] in ['3','5','7'] then Gain[7]:=Gain[7]+1;|5: end;|18: for i:=0 to 7 do|8: begin|22: if Gain[i]=3 then|8: begin|35: _hi_onEvent(onRes, st + '2;6');|12: Exit;|10: end;|7: end;|3: |32: for i:=0 to 7 do Gain[i]:=0; |19: for i:=1 to 4 do|74: begin |56: if ss1[i] in ['1','2','3'] then Gain[0]:=Gain[0]+1;|56: if ss1[i] in ['4','5','6'] then Gain[1]:=Gain[1]+1;|56: if ss1[i] in ['7','8','9'] then Gain[2]:=Gain[2]+1;|56: if ss1[i] in ['1','4','7'] then Gain[3]:=Gain[3]+1;|56: if ss1[i] in ['2','5','8'] then Gain[4]:=Gain[4]+1;|56: if ss1[i] in ['3','6','9'] then Gain[5]:=Gain[5]+1;|56: if ss1[i] in ['1','5','9'] then Gain[6]:=Gain[6]+1;|56: if ss1[i] in ['3','5','7'] then Gain[7]:=Gain[7]+1;|5: end;|18: for i:=0 to 7 do|8: begin|22: if Gain[i]=3 then|8: begin|35: _hi_onEvent(onRes, st + '1;7');|12: Exit;|10: end;|7: end;|3: |32: for i:=0 to 7 do Gain[i]:=0; |19: for i:=1 to 4 do|74: begin |56: if ss2[i] in ['1','2','3'] then Gain[0]:=Gain[0]+1;|56: if ss2[i] in ['4','5','6'] then Gain[1]:=Gain[1]+1;|56: if ss2[i] in ['7','8','9'] then Gain[2]:=Gain[2]+1;|56: if ss2[i] in ['1','4','7'] then Gain[3]:=Gain[3]+1;|56: if ss2[i] in ['2','5','8'] then Gain[4]:=Gain[4]+1;|56: if ss2[i] in ['3','6','9'] then Gain[5]:=Gain[5]+1;|56: if ss2[i] in ['1','5','9'] then Gain[6]:=Gain[6]+1;|56: if ss2[i] in ['3','5','7'] then Gain[7]:=Gain[7]+1;|5: end;|18: for i:=0 to 7 do|8: begin|22: if Gain[i]=3 then|8: begin|35: _hi_onEvent(onRes, st + '2;8');|12: Exit;|10: end;|9: end; |3: |32: for i:=0 to 7 do Gain[i]:=0; |19: for i:=1 to 5 do|74: begin |56: if ss1[i] in ['1','2','3'] then Gain[0]:=Gain[0]+1;|56: if ss1[i] in ['4','5','6'] then Gain[1]:=Gain[1]+1;|56: if ss1[i] in ['7','8','9'] then Gain[2]:=Gain[2]+1;|56: if ss1[i] in ['1','4','7'] then Gain[3]:=Gain[3]+1;|56: if ss1[i] in ['2','5','8'] then Gain[4]:=Gain[4]+1;|56: if ss1[i] in ['3','6','9'] then Gain[5]:=Gain[5]+1;|56: if ss1[i] in ['1','5','9'] then Gain[6]:=Gain[6]+1;|56: if ss1[i] in ['3','5','7'] then Gain[7]:=Gain[7]+1;|5: end;|18: for i:=0 to 7 do|8: begin|22: if Gain[i]=3 then|8: begin|35: _hi_onEvent(onRes, st + '1;9');|12: Exit;|10: end;|12: end; |31: _hi_onEvent(onRes,st + '0;9');|4:end;|0:|4:end.|
link(onRes,1461964:doWrite,[(396,237)(396,279)(291,279)(291,251)])
}
Add(DoData,12622426,259,294)
{
link(onEventData,10934407:doText,[(326,300)(326,321)])
link(Data,1914584:Text,[(265,222)(293,222)])
}
Add(ListBox,10934407,350,294)
{
Left=5
Top=40
Width=200
Height=460
AddType=1
}
Add(For,15357628,210,238)
{
IncludeEnd=1
link(onEvent,1461964:doRead,[])
link(onStop,12622426:doData,[(249,251)(249,300)])
link(End,1914584:Count,[(223,215)(300,215)])
}
Add(Button,1102391,161,84)
{
Left=150
Top=10
Caption="Save"
link(onClick,8735425:doExecute,[])
}
Add(SDialog,8735425,203,84)
{
Filter="TXT|*.txt"
StartDir="C:\A_WinGamesHiAsm\hiasm_4,04b186\"
FileName="Крест__Ноль.txt"
link(onExecute,1704031:doEvent1,[])
}
Add(Memory,2487976,294,84)
{
Default=String(C:\A_WinGamesHiAsm\hiasm_4,04b186\КрестНоль.txt)
}
Add(Hub,1704031,245,84)
{
link(onEvent1,11364811:doWork2,[])
link(onEvent2,1914584:doSave,[(270,97)(270,195)])
}
Add(Button,6061942,161,140)
{
Left=10
Top=10
Caption="Open"
link(onClick,10860520:doExecute,[])
}
Add(HubEx,11364811,273,84)
{
link(onEvent,2487976:doValue,[])
}
Add(ODialog,10860520,203,140)
{
Filter="TXT|*.txt"
StartDir="C:\A_WinGamesHiAsm\hiasm_4,04b186\."
FileName="КрестНоль.txt"
link(onExecute,2054965:doEvent1,[])
}

карма: 19

0
Ответов: 791
Рейтинг: 168
#5: 2021-03-28 23:13:38 ЛС | профиль | цитата
Vadimluk1, можно создать схему для игры в крестики-нолики, без всяких промежуточных действий и создании вложенных папок.
Собрал "небольшую" схему. Выиграть не так просто, но можно. ПКМ - ход человека.
https://forum.hiasm.com/getfile/39222
Обновил ссылку

Редактировалось 5 раз(а), последний 2021-03-30 16:11:55
карма: 16

0
Ответов: 322
Рейтинг: 8
#6: 2021-03-30 15:01:59 ЛС | профиль | цитата
В 100% на третий ход выигрываю! (пробывал 5 раз, результат одинаковый)
123.jpg
где - то в проге ошибка.
карма: 0

0
Ответов: 791
Рейтинг: 168
#7: 2021-03-30 16:01:23 ЛС | профиль | цитата
Dad2016, вот ты и нашёл
Gunta писал(а):
небольшая "дырка"

Поправил логику, проверяйте
https://forum.hiasm.com/getfile/39222

Редактировалось 1 раз(а), последний 2021-03-30 16:08:29
карма: 16

0
7
Сообщение
...
Прикрепленные файлы
(файлы не залиты)