The game uses a square board measuring 8 × 8 cells (all cells can be of the same color) and 64 special pieces painted from different sides in contrasting colors, for example, white and black. Board cells are numbered from the upper left corner: verticals - in Latin letters, horizontals - in numbers. One player plays white, the other black. When making a move, the player puts the chip on the cell of the board with “his” color up.
At the beginning of the game, 4 chips are put in the center of the board: black on d5 and e4, white on d4 and e5.
- Black makes the first move. Next, the players take turns.
- When making a move, a player must place his chip on one of the cells of the board in such a way that between this put chip and one of the chips of its color already on the board there is a continuous row of opponent's chips, horizontal, vertical or diagonal (in other words, a continuous row of chips the opponent turned out to be “closed” by the player’s chips from two sides). All opponent's pieces that are in the "closed" row on this turn are turned over to the other side (change color) and are transferred to the player who has walked.
- If as a result of one move, more than one row of the opponent's chips “closes” at the same time, then all the chips that are on all the “closed” rows are turned over.
- The player has the right to choose any of the possible moves for him. If a player has possible moves, he cannot refuse to move. If the player has no valid moves, the move is transferred to the opponent.
- The game stops when all the chips are put on the board or when no player can make a move. At the end of the game, the counting of chips of each color is carried out, and the player whose chips on the board are displayed more is declared the winner. If the number of chips is equal, a draw is counted.
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
Copy Source | Copy HTML def compStep (player): table = [ [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 5 , 3 , 1 , 1 , 3 , 5 , 2 ], [ 2 , 6 , 4 , 3 , 3 , 4 , 6 , 2 ], [ 8 , 8 , 6 , 5 , 5 , 6 , 8 , 8 ], [ 1 , 8 , 2 , 2 , 2 , 2 , 8 , 1 ] ] pX = [ 0 ] * 61 pY = [ 0 ] * 61 minE = 9 maxE = 0 NP = 0 for row in range ( 8 ): for col in range ( 8 ): E = eated(row, col, player) if (minE > table[row][col]) & (E < 255 ) & (E > 0 ): minE = table[row][col] NP = 0 maxE = 0 if (minE == table[row][col]) & (E < 255 ): if E > maxE: maxE = E NP = 1 pX[NP] = row pY[NP] = col elif E == maxE: NP = NP + 1 pX[NP] = row pY[NP] = col E = 1 makeStep(player, pX[E], pY[E]) area[pX[E]][pY[E]] = player
I have not seriously used Python 2.6 with py2exe, also I have no experienceThat is the most difficult thing to put to the program library and manifest file.
little experiment showed this approach
(I tested only on XP machines, not Vista!):
I deinstalled python 2.6 (since I had installed it for all users) and
installed it again 'for me only'. This installation copied the msvcr90.dll
and Microsoft.VC90.CRT.manifest files into the c: \ python26 folder.
Then I ran py2exe over a very simple script ('print "Hi"') which created
an executable. This executable worked fine on a machine where msvcr90.dll
was installed in Windows \ SxS (or how it's called), but did NOT run on another
machine where msvcr90.dll is not installed in Windows \ SxS.
Then I copied the msvcr90.dll and Microsoft.VC90.CRT.manifest files into the dist
folder where py2exe had created my executable. Now the exe works on both machines.
WxPython script py2exe crashed because
it tried to load msvcp90.dll (IIRC), but it didn't find it (it seems only to be installed
in the Windows \ SxS folder). This may be a bug in py2exe.
Source: https://habr.com/ru/post/87009/