code fixes

Fixed resistor code by checking each direction and only adding valid
currents
Added code to allow a single 1 point with no 0 point (which might make
sense on an infinite grid)
Added code to say when you hit the edge of a finite grid