onix-chess
Advanced tools
Comparing version 1.0.6 to 1.0.8
@@ -130,2 +130,3 @@ import { Position } from './Position'; | ||
moveLast(): void; | ||
getResultName(mode: 'char' | 'short' | 'long' | 'html'): string; | ||
} |
@@ -475,2 +475,17 @@ "use strict"; | ||
}; | ||
Chess.prototype.getResultName = function (mode) { | ||
if (mode === "char") { | ||
return resultChar[this.Result]; | ||
} | ||
else if (mode === "short") { | ||
return resultShortString[this.Result]; | ||
} | ||
else if (mode === "long") { | ||
return resultLongStr[this.Result]; | ||
} | ||
else if (mode === "html") { | ||
return resultHtmlStr[this.Result]; | ||
} | ||
return "?"; | ||
}; | ||
return Chess; | ||
@@ -477,0 +492,0 @@ }()); |
{ | ||
"name": "onix-chess", | ||
"version": "1.0.6", | ||
"version": "1.0.8", | ||
"description": "Onix chess library", | ||
@@ -5,0 +5,0 @@ "main": "built/index.js", |
@@ -579,2 +579,16 @@ import { Hashtable } from 'onix-core/built/Hashtable'; | ||
} | ||
public getResultName(mode: 'char' | 'short' | 'long' | 'html'): string { | ||
if (mode === "char") { | ||
return resultChar[this.Result]; | ||
} else if (mode === "short") { | ||
return resultShortString[this.Result]; | ||
} else if (mode === "long") { | ||
return resultLongStr[this.Result]; | ||
} else if (mode === "html") { | ||
return resultHtmlStr[this.Result]; | ||
} | ||
return "?"; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
916174
18310