[game] added win and fail function