From: YAD Date: 2006-09-08T10:15:08+09:00 Subject: Re: symbol tricks Paul Lutus wrote: > I'm making an assumption here, that you want to find a winning pattern. I want to calculate several things (at different times), including whether a player has two in a row, and whether a player has two blank squares that will win the game (two pairs in a row that require different squares to be completed). Since that's a total of six functions, I figured combining rows & cols into one function would be the simplest way to reduce the total amount of code. > def find_winner(array) > w = test_rows(array) \ > || test_rows(array.transpose) \ > || test_diagonals(array) This looks like the simplest way to do it. The only concern I would have with this solution is performance in searching a whole tree of possible future grids. -- Yet another Dan