mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 19:58:13 +08:00
dedde94643
* the process of using card (uncompleted) * code style: tab is 2 spaces(not \t or 4 space) * update lua54.dll to MinGW version(no cygwin1.dll required) * basic ui logic * ActiveSkill * modidy ActiveSkill defaults * todo: defaultEquipSkill * client * send use card to server * playing phase, equip Co-authored-by: Ho-spair <linyuy@163.com>
22 lines
426 B
JavaScript
22 lines
426 B
JavaScript
.pragma library
|
|
|
|
function convertNumber(number) {
|
|
if (number === 1)
|
|
return "A";
|
|
if (number >= 2 && number <= 10)
|
|
return number;
|
|
if (number >= 11 && number <= 13) {
|
|
const strs = ["J", "Q", "K"];
|
|
return strs[number - 11];
|
|
}
|
|
return "";
|
|
}
|
|
|
|
Array.prototype.contains = function(element) {
|
|
return this.indexOf(element) != -1;
|
|
}
|
|
|
|
Array.prototype.prepend = function() {
|
|
this.splice(0, 0, ...arguments);
|
|
}
|