fixed the Stack overflow error
Merge pull request #5 from Te4ko/master

Board.java