added main game logic: checkwinner func