Implemented update function for brain class

Implemented Update() function in the brain class to update all neurons'
states and then all neurons' outputs