Added basic state machine and win condition