csherin/mazes — Issue #9: Nearly identical method defined in 2 places (shifted_down?)
Author: PragTob
Created: 2012-01-20 19:23:12+00:00
State: open

In Ascii::Sigma we got:

def shifted_down?(x)
1 == x % 2
end

and in Sigma we got:

def shifted_up?(coordinate)
0 == coordinate[0] % 2
end

def shifted_down?(coordinate)
!shifted_up?(coordinate)
end

That's essentially doing the same, please DRY that up with the use of a module or something like that.