Working gameplay with restart and ending