Implements updateBoard and resetBoard functions