restructure: define getValue in Board.js