[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/games/ktron
From: Stas Verberkt <legolas () legolasweb ! nl>
Date: 2009-01-01 16:52:11
Message-ID: 1230828731.529306.28927.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 904213 by sverberkt:
Changed Message of SnaKe to display score at end of game.
Added classes for an obstacle.
At the moment the only obstacle is a bush, copied from the border.
It will certainly hurt the snake's nose when he hits it.
M +1 -0 CMakeLists.txt
M +2 -1 object.h
A obstacle.cpp [License: GPL (v2+)]
A obstacle.h [License: GPL (v2+)]
M themes/default.svgz
M +7 -0 tron.cpp
--- trunk/playground/games/ktron/CMakeLists.txt #904212:904213
@@ -23,6 +23,7 @@
object.cpp
snakepart.cpp
item.cpp
+ obstacle.cpp
playfield.cpp
player.cpp
intelligence.cpp
--- trunk/playground/games/ktron/object.h #904212:904213
@@ -30,7 +30,8 @@
enum Type {
Object,
Item,
- SnakePart
+ SnakePart,
+ Obstacle
};
}
--- trunk/playground/games/ktron/tron.cpp #904212:904213
@@ -352,7 +352,14 @@
message += '\n';
}
}
+ else
+ {
+ int points = players[0]->getScore();
+ message += i18n("SnaKe game ended with %1 points", points);
+ message += '\n';
+ }
+
message += i18n("Press any of your direction keys to start!");
QPixmap messageBox = Renderer::self()->messageBox(message);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic