Skip to content

Instantly share code, notes, and snippets.

View thescientician's full-sized avatar

Ben Stevenson thescientician

  • Calgary, Alberta
  • 08:16 (UTC -06:00)
View GitHub Profile
@thescientician
thescientician / i18n_compare.rb
Created June 25, 2018 15:39
Compare two different i18n translation files for missing values
LOCALE_1 = "config/locales/fr.yml"
LOCALE_2 = "config/locales/en.yml"
require 'yaml'
def flatten_keys(hash, prefix="")
keys = []
hash.keys.each do |key|
if hash[key].is_a? Hash
current_prefix = prefix + "#{key}."
class Ben < RTanque::Bot::Brain
NAME = "Panzor"
include RTanque::Bot::BrainHelper
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE
def tick!
target = nearest_target
if(target)
movement(target)