Simple match game written with java