[gnome-nibbles/arnaudb/fix-level-25] Fix level 25.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles/arnaudb/fix-level-25] Fix level 25.
- Date: Mon, 22 Jun 2020 17:43:30 +0000 (UTC)
commit 62f00ca1c5dbb7b4cfb15bb4348453852d96cbb4
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Jun 22 19:27:57 2020 +0200
Fix level 25.
We were checking for heads
collision a bit too far in
the future, forcing player
to kill worm for finishing
the level 25. I think this
check will be good enough.
src/worm.vala | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/worm.vala b/src/worm.vala
index f96e6d8..bc207ca 100644
--- a/src/worm.vala
+++ b/src/worm.vala
@@ -246,10 +246,7 @@ private class Worm : Object
if (!is_materialized || !other_worm.is_materialized)
return false;
- var worm_pos = position_move ();
- var other_worm_pos = other_worm.position_move ();
-
- if (worm_pos == other_worm_pos)
+ if (position_move () == other_worm.head)
return true;
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]