projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Play against computer almost OK: need to fix Board component
[vchess.git]
/
client
/
src
/
utils
/
printDiagram.js
diff --git
a/client/src/utils/printDiagram.js
b/client/src/utils/printDiagram.js
index
f3f77d8
..
6e095c9
100644
(file)
--- a/
client/src/utils/printDiagram.js
+++ b/
client/src/utils/printDiagram.js
@@
-1,9
+1,11
@@
+import { ArrayFun } from "@/utils/array";
+
// Turn (human) marks into coordinates
function getMarkArray(marks)
{
if (!marks || marks == "-")
return [];
// Turn (human) marks into coordinates
function getMarkArray(marks)
{
if (!marks || marks == "-")
return [];
- let markArray =
doubleArray
(V.size.x, V.size.y, false);
+ let markArray =
ArrayFun.init
(V.size.x, V.size.y, false);
const squares = marks.split(",");
for (let i=0; i<squares.length; i++)
{
const squares = marks.split(",");
for (let i=0; i<squares.length; i++)
{
@@
-18,7
+20,7
@@
function getShadowArray(shadow)
{
if (!shadow || shadow == "-")
return [];
{
if (!shadow || shadow == "-")
return [];
- let shadowArray =
doubleArray
(V.size.x, V.size.y, false);
+ let shadowArray =
ArrayFun.init
(V.size.x, V.size.y, false);
const squares = shadow.split(",");
for (let i=0; i<squares.length; i++)
{
const squares = shadow.split(",");
for (let i=0; i<squares.length; i++)
{