一、详细介绍
TQGame在线小游戏联机平台1.3.2
实在是没有什么事情干了
索性无聊就搞了个这么个东西出来
目前有两个模式 都是双人的
带音效
奖池里抽到的道具可以在背包里使用
然后呢细分了排行榜以及个人信息视图
每个模式都有它的三个评分点,三个评分点决定了最后的综合评分,综合评分又决定了最后的排位积分加减值
对局结算场景和匹配成功场景都做了
运行环境:php8.0 及以上 MySQL5.7 及以上
二、效果展示
1.部分代码
代码如下(示例):
function regist_check_password_safe(password) {
let score = 0;
if (password.length >= 6 && password.length < 8) {
score += 1;
} else if (password.length >= 8 && password.length <= 12) {
score += 2;
} else {
score += 3;
}
if (/[a-z]/.test(password)) score += 1;
if (/[A-Z]/.test(password)) score += 1;
if (/[0-9]/.test(password)) score += 1;
if (/[\W_]/.test(password)) score += 1;
const repeatRegex = /(.)\1{1,}/;
if (repeatRegex.test(password)) {
score -= 2;
}
const sequentialRegex = /([a-zA-Z0-9])(?=\1{1,})/;
const sequentialChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
for (let i = 0; i < sequentialChars.length - 1; i++) {
const seq = sequentialChars.slice(i, i + 3);
if (password.includes(seq)) {
score -= 2;
}
}
if (score <= 3) {
if (language_ischinese) {
return {
level: 1,
message: '密码太弱,建议增加复杂度。'
};
}
return {
level: 1,
message: 'The password is too weak, and it is recommended to increase the complexity.'
};
} else if (score > 3 && score <= 5) {
return {
level: 2,
message: 'Passwords are medium in strength and it is recommended to increase complexity.'
};
} else if (score > 5 && score <= 7) {
if (language_ischinese) {
return {
level: 3,
message: '密码强度中等,建议增加复杂度。'
};
}
return {
level: 3,
message: 'The password is strong, very good!'
};
} else {
if (language_ischinese) {
return {
level: 4,
message: '密码强度很高,非常安全!'
};
}
return {
level: 4,
message: 'The password is very strong and very secure!'
};
}
}
2.效果图展示