[gnome-nibbles/arnaudb/fix-level-25: 26/27] Fix level 25.



commit e365e3824d90aaea6ac32f6918bb5845302de63d
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 d49d145..39f976b 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]