NAME
Game::Snake::Result - how a game of snake ended
VERSION
Version 0.13
SYNOPSIS
my $result = $game->result;
print $result->cause; # wall
print $result->score; # 120
print $result->stringify; # Game over: hit the wall at 120 points, 15 long
DESCRIPTION
"result" in Game::Snake hands one of these back once the game has finished.
METHODS
cause
wall, body, full or quit.
score, length, ticks, speed
The score, how long the snake was, how many ticks were taken, and the speed reached, in cells a second.
died
1 unless the cause is quit.
causes
Every cause.
stringify
One sentence: "Game over: hit the wall at 120 points, 15 long", or "Quit at 120 points, 15 long".
AUTHOR
LNATION, <email at lnation.org>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2024 by LNATION.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)