Add input getting function
Refactor illegal moves detection,

Begin adding Flip function