Snake
Public Member Functions | Public Attributes | List of all members
Snake.Snake Class Reference

An Abstract Data type representing a snake character object. More...

Public Member Functions

def __init__ (self, blockSize, direct, speed, axis)
 Snake constructor. More...
 
def draw (self, x, y)
 Draw method uses pygame to draw the snake object. More...
 

Public Attributes

 speed
 
 direct
 
 size
 
 axis
 

Detailed Description

An Abstract Data type representing a snake character object.

Constructor & Destructor Documentation

def Snake.Snake.__init__ (   self,
  blockSize,
  direct,
  speed,
  axis 
)

Snake constructor.

Initializes a Snake object with its initial attributes

Parameters
blockSizethe width and height of the square block representing the snake
directThe direction of the snake's movement
speedThe initial speed of the snake's movement

Member Function Documentation

def Snake.Snake.draw (   self,
  x,
  y 
)

Draw method uses pygame to draw the snake object.

Parameters
xThe x-coordinate where the block should be drawn
yThe y-coordinate where the block should be drawn

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