Pass board as function parameter instead of storing in constructor