OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sokoban.Block Class Reference

Public Member Functions

def __init__
 
def append_to_atomspace
 
def __repr__
 

Public Attributes

 y
 
 character
 
 atomspace
 

Private Member Functions

def _add_to_atomspace_as_player
 
def _add_to_atomspace_as_box
 
def _add_to_atomspace_as_wall
 
def _add_to_atomspace_as_goal
 
def _do_nothing
 
def _give_position_to_node
 

Static Private Attributes

dictionary _method_by_charachter
 

Detailed Description

Definition at line 62 of file sokoban.py.

Constructor & Destructor Documentation

def sokoban.Block.__init__ (   self,
  x = 0,
  y = 0,
  charachter = ' ' 
)

Definition at line 64 of file sokoban.py.

Member Function Documentation

def sokoban.Block.__repr__ (   self)

Definition at line 124 of file sokoban.py.

References sokoban.Block.character, and sokoban.Block.y.

def sokoban.Block._add_to_atomspace_as_box (   self)
private

Definition at line 78 of file sokoban.py.

References sokoban.Block.y.

def sokoban.Block._add_to_atomspace_as_goal (   self)
private

Definition at line 90 of file sokoban.py.

References sokoban.Block.y.

def sokoban.Block._add_to_atomspace_as_player (   self)
private

Definition at line 75 of file sokoban.py.

def sokoban.Block._add_to_atomspace_as_wall (   self)
private

Definition at line 84 of file sokoban.py.

References sokoban.Block.y.

def sokoban.Block._do_nothing (   self)
private

Definition at line 97 of file sokoban.py.

def sokoban.Block._give_position_to_node (   self,
  node 
)
private

Definition at line 109 of file sokoban.py.

References sokoban.Block.atomspace, and sokoban.Block.y.

def sokoban.Block.append_to_atomspace (   self,
  atomspace 
)

Definition at line 68 of file sokoban.py.

Member Data Documentation

dictionary sokoban.Block._method_by_charachter
staticprivate
Initial value:
1 = {'@':(_add_to_atomspace_as_player,),
2  '+':(_add_to_atomspace_as_player, _add_to_atomspace_as_goal),
3  '$':(_add_to_atomspace_as_box,),
4  '*':(_add_to_atomspace_as_box, _add_to_atomspace_as_goal),
5  '#':(_add_to_atomspace_as_wall,),
6  '.':(_add_to_atomspace_as_goal,),
7  ' ':(_do_nothing,)
8  }

Definition at line 100 of file sokoban.py.

sokoban.Block.atomspace

Definition at line 69 of file sokoban.py.

sokoban.Block.character

Definition at line 66 of file sokoban.py.

sokoban.Block.y

Definition at line 65 of file sokoban.py.


The documentation for this class was generated from the following file: