base code about match game