made match game a module, extracted all game logic to matchgame