implemented most of Board.java