created gameDAO.js and moved functions from chessController into it