5
$\begingroup$

I have taken the following code from the mister Wizard answer to my old question Programming the fiver game

DynamicModule[{flip, v, c, square, gui},
 flip[i_, j_] :=
  (v[##] *= -1;) & @@@
   {{i, j}, {i + 1, j}, {i - 1, j}, {i, j + 1}, {i, j - 1}};

 _v = 1;
 {c[1], c[-1], c[0]} = {LightBlue, LightRed, Gray};

 square =
  Button[
    Spacer[{51, 51}], flip @ ##
    , Background -> Dynamic @ c @ v @ ##
    , Appearance -> None
  ] &;

 gui =
  Labeled[ #
    , {Button["Reset", ClearAll[v]; _v = 1],
        ColorSetter@*Dynamic@*c /@ {1, -1, 0} // Column}
    , {Bottom, Right}
  ] &;

 Grid[
     Array[square, {5, 5}]
     , Frame -> c[0]
     , Background -> c[0]
     , Spacings -> {{5, {1}, 5}, {5, {1}, 5}}/10
 ] // gui // Deploy
]

I would like to know if, as there is no call to external data, if it is possible do deploy it as an html page and hoçw to do this ? I have tried the suggested solutions in MSE but nothing works.

$\endgroup$
  • 4
    $\begingroup$ It's unlikely to be simple. There's no good Mathematica to JS converter that I know of and the Wolfram Cloud is an expensive minimally functional boondoggle. $\endgroup$ – b3m2a1 Jul 9 '18 at 18:05
  • 2
    $\begingroup$ @b3m2a1 A complete and utter boondoggle!! $\endgroup$ – M.R. Jul 9 '18 at 18:44
  • 1
    $\begingroup$ M.R. could you say this again in a transparent language ? $\endgroup$ – cyrille.piatecki Jul 9 '18 at 19:43
  • 3
    $\begingroup$ M.R. means that it is useless $\endgroup$ – mikado Jul 9 '18 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.