Skip to content

Instantly share code, notes, and snippets.

View jsuchal's full-sized avatar

Jano Suchal jsuchal

View GitHub Profile
require 'rubygems'
require 'bundler/setup'
require 'koala'
require 'date'
access_token = 'xxx' # fill in from https://developers.facebook.com/tools/explorer
Koala.configure do |config|
@jsuchal
jsuchal / slovka-solver.rb
Created February 6, 2022 23:14
Slovka Solver
require 'active_support/all'
def pattern(word, candidate)
[0,1,2,3,4].map do |i|
if word[i] == candidate[i]
'X'
elsif word[i] != candidate[i] && candidate.include?(word[i])
'x'
else
'.'