NAME

Game::Object::Worm::Shaitan - Worm

SYNOPSIS

Nah...

PROPERTIES

isRealPlayer

Whether this is a real life player or not.

Default: 0

probabilityTurnTowardsPrize

The probability (0..1) that the Worm will turn towards a prize when it's on the same line.

Default: 0 (no turning)

METHODS

new([$left = 11], [$top = 12], [$direction = "left"], [$length = 3)

Create new Shaitan Worm, facing in $direction ("left", "right", "up", "down" (only left supported right now)), with a body a total size of $length.

possiblyTurnRandomly()

If probabilityTurnRandomly(), turn left/right

Return the turned direction ("left"/"right") or "" if no turn was made.