Updated next state logic
First draft
Merge branch 'master' of github.com:woodworthkyle/ece337-final