added saveboard() which writes the positions of tiles in an array to the Database.