Package pyrobot :: Package plugins :: Package brains :: Module KonanePlayer
[frames | no frames]

Module pyrobot.plugins.brains.KonanePlayer

This module contains a class of a random Konane Player.
The brain KonanePlayer program plays a random game of Konane.

Classes
KonanePlayer A simple Random Konane Player.

Function Summary
  add(pos, offset)
Adds two board positions together...
  formatMove(move)
Formats a list of positions into a jump() string.
  getEmpties(board)
Returns all of the empty positions on board.
  INIT(engine)
  moveGenerator(board, myPiece, firstMove)
Generates legal board moves.
  otherPiece(piece)
What is the opponent's shape?...
  validPos(pos, offset)
Is this position + offset a valid board position?...

Function Details

add(pos, offset)

Adds two board positions together

formatMove(move)

Formats a list of positions into a jump() string.

getEmpties(board)

Returns all of the empty positions on board.

moveGenerator(board, myPiece, firstMove)

Generates legal board moves. Doesn't find multiple-jumps.

otherPiece(piece)

What is the opponent's shape?

validPos(pos, offset=(0, 0))

Is this position + offset a valid board position?

Generated by Epydoc 2.1 on Mon Jul 25 01:39:28 2005 http://epydoc.sf.net