Still in lockdown on holiday, so I thought I would create a version of backgammon that can be played with Visio for the web. This was inspired by my original Visio tutor, the late David Edson, who created a Visio backgammon document which included macros. Macros are not available in Visio for the web, so I have created one where the dice can be shaken, the doubling cube changed, and the pieces reset, using nothing but ShapeSheet formulas.
Checkout the previous two articles in this series Play Checkers with Visio in Teams and Play Chess with Visio in Teams for more information about how the resetting of positions works works. Backgammon requires a Doubling Cube and Dice shape, in addition to a different board to the previous two.
Each of the Die sub-shapes within the Dice shape, have a User.ShakeDiceTrigger formula:
=IF(ThePage!User.ShakeDice,
SETF(GetRef(Prop.Face),"=INDEX("&INT(RAND()*6)&",Prop.Face.Format)"),
0)
This sets a random number between 1 and 6 on the die face. It was not strictly necessary to have a Prop.Face Shape Data row of Fixed List type, but I was originally going to provide a list to choose from. If the Prop.Face Shape Data row was a number, then the formula could have been:
=IF(ThePage!User.ShakeDice,
SETF(GetRef(Prop.Face),"=INT(RAND()*6) + 1"),
0)
Download Online Backgammon.vsdx and add it to your SharePoint Online or Teams library.
How to migrate from Lucidchart to Visio
I am pleased to announce that I will be presenting a webinar on Thursday 10th October 2024 where I will be demonstrating how to convert many types of diagrams from Lucidchart to Visio, and keep their smartness. Over the 30 years that I have been using and developing solutions with Visio, I have seen many…
My new book on Visualizing Processes with Microsoft Visio has launched
Back in the early 1990s, there was an application called ABC Flowcharter that was the market leader for diagramming business flowcharts, but some of the brains behind Aldus PageMaker saw an opportunity to create something smarter, and left to write the Visio product, with the stated aim to overtake ABC Flowcharter within 2 years. They…
Interactive Demographics of the European Union in Visio
I was recently contacted by a reader, Stanley M. Max (Towson University lecturer), who had started creating a Visio map of the 27 countries in the European Union in 2020, along with the demographics culled from Wikipedia. He wanted to know if the map and stats could be combined to make a more appealing presentation.…
Editing Visio Data Visualizer in Excel
I have previously described how to use the Visio Data Visualizer add-in in Excel, but I didn’t make it clear how you can edit the diagram created if you have a Visio license. So, I have recorded three short videos to briefly explain this. (more…)
Taking Visio Actions Rows to the limit
I recently (re-)discovered that there is a limit to the number of Actions section rows that will be evaluated for display on the right mouse menu of a Visio shape. I have not hit a limit (yet) for the number of rows that can be added to the Actions section … so why is there…
Custom Shapes in Visio in M365 and Web
Microsoft recently announced the ability to access the shapes in the document stencil whilst using Visio for Web … if you have a Visio Plan 2 license. So, I thought I would make it clear what that means for custom shape developers. There are now three licenses that provide the ability to edit Visio diagrams…
Leave a Reply