[gnome-robots] remove global variable current_cat
- From: Andrey Kutejko <akutejko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-robots] remove global variable current_cat
- Date: Tue, 6 Oct 2020 19:31:41 +0000 (UTC)
commit 18ef7a9a27451eedc116c557fb7885ae24e60cda
Author: Andrey Kutejko <andy128k gmail com>
Date: Mon Aug 31 23:58:45 2020 +0200
remove global variable current_cat
src/game.vala | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index f5b54bd..fc50cbf 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -73,8 +73,6 @@ public class Game {
uint game_timer_id = -1;
Arena temp_arena = null;
- Scores.Category current_cat;
-
public Game () {
arena = new Arena (GAME_WIDTH, GAME_HEIGHT);
rand = new Rand ();
@@ -106,8 +104,8 @@ public class Game {
if (sc != 0) {
string name = category_name_from_key (key);
- current_cat = new Scores.Category (key, name);
- highscores.add_score.begin (sc, current_cat, null, (ctx, res) => {
+ var category = new Scores.Category (key, name);
+ highscores.add_score.begin (sc, category, null, (ctx, res) => {
try {
highscores.add_score.end (res);
} catch (Error error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]