As PegaWorld is just around the corner, we wanted to help out Alan Trefler to play chess on our beloved Pega platform.
For those interested in knowing how to do it, here’s our guide:
We used an MIT licensed chess game that was written in javascript. (https://github.com/kbjorklu/chess).
After we got the script, we created two text file rules, one to hold the .js and one for the .css where we have the style of the game. Then we created a control rule to create a chess control which is presented in the picture below:
We created a section and used our custom control:
After everything was set, we tested our new game on our portal:
After a few rounds, the result was the following:
After testing I had two conclusions: on one hand, I’m bad at chess, on the other hand, the game is working properly and it is a good example to see that we can embed any js into our site without a problem.