replace new res
fix rand() bug
fix matrix cell no new bug, add touch pos judge