%scout window sq11, sq12, sq13; window sq21, sq22, sq23; window sq31, sq32, sq33; screen = ; point p11, p12, p13; point q11, q12, q13; point p21, p22, p23; point q21, q22, q23; point p31, p32, p33; point q31, q32, q33; point offset; integer size; string cont11, cont12, cont13; string cont21, cont22, cont23; string cont31, cont32, cont33; string bgcol, fgcol; bgcol = "lightblue"; fgcol = "black"; sq11 = { type: DONALD pict: cont11 box: [p11,q11] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; ## for testing purposes, use: ## screen = ; offset = {size,size}; p11 = offset; q11 = p11 + {size,size}; p12 = p11 + {size,0}; q12 = p12 + {size,size}; p13 = p12 + {size,0}; q13 = p13 + {size,size}; p21 = p11 + {0,size}; q21 = p21 + {size,size}; p22 = p21 + {size,0}; q22 = p22 + {size,size}; p23 = p22 + {size,0}; q23 = p23 + {size,size}; p31 = p21 + {0,size}; q31 = p31 + {size,size}; p32 = p31 + {size,0}; q32 = p32 + {size,size}; p33 = p32 + {size,0}; q33 = p33 + {size,size}; size = 20; %donald viewport NOUGHT circle nought nought = circle({500,500}, 300) viewport CROSS line nwse, swne nwse = [{200,800},{800,200}] swne = [{200,200},{800,800}] viewport BLANK %scout sq21 = { type: DONALD pict: cont21 box: [p21,q21] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq31 = { type: DONALD pict: cont31 box: [p31,q31] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq12 = { type: DONALD pict: cont12 box: [p12,q12] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq13 = { type: DONALD pict: cont13 box: [p13,q13] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq22 = { type: DONALD pict: cont22 box: [p22,q22] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq23 = { type: DONALD pict: cont23 box: [p23,q23] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq33 = { type: DONALD pict: cont33 box: [p33,q33] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; sq32 = { type: DONALD pict: cont32 box: [p32,q32] sensitive: ON border: 1 bgcolor:bgcol fgcolor:fgcol }; %eden cont11 is (s1==o) ? "NOUGHT" : ((s1==x) ? "CROSS" : "BLANK"); cont12 is (s2==o) ? "NOUGHT" : ((s2==x) ? "CROSS" : "BLANK"); cont13 is (s3==o) ? "NOUGHT" : ((s3==x) ? "CROSS" : "BLANK"); cont21 is (s4==o) ? "NOUGHT" : ((s4==x) ? "CROSS" : "BLANK"); cont22 is (s5==o) ? "NOUGHT" : ((s5==x) ? "CROSS" : "BLANK"); cont23 is (s6==o) ? "NOUGHT" : ((s6==x) ? "CROSS" : "BLANK"); cont31 is (s7==o) ? "NOUGHT" : ((s7==x) ? "CROSS" : "BLANK"); cont32 is (s8==o) ? "NOUGHT" : ((s8==x) ? "CROSS" : "BLANK"); cont33 is (s9==o) ? "NOUGHT" : ((s9==x) ? "CROSS" : "BLANK");