<commit_before>{-
Same Game implementation.

5 high by 10 wide squares of 3 colors
starts with random color assignment

click on one of those squares
if there is at least one neighboring square (nsew), disappears those squares

remaining square fall down and to the left (in that order)
until all are gone
or no more squares have neighbors

goal:
- use signals

check list:
- draw 10 x 5 grid of squares same color with gaps
- draw random colors
- add some randomness to heights
- respond to click
- check neighbors
- remove those guys if necessary
- redraw squares

small steps:
method to generate pairs of x,ys 00, 01, 10, 11 ec
and map offsetbl over those

then assign random colors over those

limit size to fit area
-}

width = 500
height = 250
sq = 40
sp = 2
box color = filled color (square sq)
offsetBL idxX idxY = move ((sq / 2) - (width / 2) + (sq * idxX) + (sp * idxX) , 
                           (sq / 2) - (height / 2) + (sq * idxY) + (sp * idxY))
main = collage width height [ offsetBL 0 0 (box red)
                            , offsetBL 0 1 (box red)
                            , offsetBL 1 0 (box red)]
<commit_msg>generate starting square structure<commit_after>{-
Same Game implementation.

5 high by 10 wide squares of 3 colors
starts with random color assignment

click on one of those squares
if there is at least one neighboring square (nsew), disappears those squares

remaining square fall down and to the left (in that order)
until all are gone
or no more squares have neighbors

goal:
- use signals

check list:
- draw random colors
- add some randomness to heights
- respond to click
- check neighbors
- remove those guys if necessary
- redraw squares

small steps:
method to generate pairs of x,ys 00, 01, 10, 11 ec
and map offsetbl over those

then assign random colors over those

limit size to fit area
-}

width = 500
height = 250
sq = 40
sp = 2
box color = filled color (square sq)
offsetBL (idxX, idxY) = move ((sq / 2) - (width / 2) + (sq * idxX) + (sp * idxX) , 
                           (sq / 2) - (height / 2) + (sq * idxY) + (sp * idxY))

pairs = map (\x -> map (\y -> (x, y)) [0..4]) [0..9]
allPairs = concat pairs
squares = map (\pair -> offsetBL pair (box red)) allPairs
main = collage width height squares

{'fraction_non_alphanumeric': 0.0811529933481153, 'fraction_numerical': 0.027937915742793792, 'mean_word_length': 2.8043844856661044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1816189', 'n_tokens_mistral': 742, 'n_tokens_neox': 661, 'n_words': 348}