Преглед изворни кода

do a resety to avoid a regretti / also no gulash only potato ):

Phil пре 2 година
родитељ
комит
07a031fdeb
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      lib/tron.rb

+ 4 - 1
lib/tron.rb

@@ -208,7 +208,8 @@ def decide()
   # check area right
   right = check_area("right")
 
-  if($ticks < 30)
+  if($ticks < 20)
+    puts "'neue' logik"
 
     if left > front && left > right
       puts "#{left} > #{front} && #{left} > #{right} -> left"
@@ -224,6 +225,7 @@ def decide()
       end
     end
   else
+    puts "'alte' logik"
 
     if check_front > -1 && !$dead.include?(check_front) || check_area("front") < 10
     
@@ -288,6 +290,7 @@ def initmap()
   $lastturn = "left"
   $dead = Array.new(0)
   $lasttick = 0
+  $ticks = 0
   chat("Rock and Stone!")
 end