Home Applications SEA BATTLE on EXCEL

SEA BATTLE on EXCEL

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
4.5
1 reviews
0
Awards
137
Views
0
IPM installs
0
0
Details
Releases
Reviews  (1)
Issues
Pull requests  (2)
Articles  (1)
An example of using virtual excel deployed in M

What's new in this version

Initial Release

How it works.

After starting, Excel will establish a connection with the m-server. Further actions are determined by the mx-formulas (m-commands). During operation, interactive communication is maintained between the sheet and its virtual double in the m-server. M-commands are executed in virtual cells of the double, but the result is displayed on the real sheet as well.

The client part of the code for this game is on the MS Excel sheet and consists of:

  1. m-commands for random arranging ships on the playing field (21 cells)

  2. m-command to enable on-click m-trigger on all 100 cells of the playing field (1), red font

  3. m-trigger (1), red font, see excel-file mx_forma_test.xlsb # sheet 'sea-battle'

The server part of the code (vmx.ro) is installed ones, it not change depending on the task, is the same for IRIS, CACHE, 16, 8-bit encoding, any applications, games, reports. The server side creates and supports ‘virtual excel’ in M.

SEA BATTLE can be tested without your mx-server, just download MX and unzip to any folder on comp with MS Excel, then run mx-sea-battle.xlsb, press big top button (51) The empty square of 10 by 10 cells will appear. Ship will unhide on click, the last section will red. For restart press “R”.

To install mx-server IRIS (tested for Ubuntu 18.04.4 LTS) unzip https://github.com/mx-alex/MX to any folder /path/to/mymx, then:

$ docker run --name myiris -p 5264:5264 -p 52773:52773 -v /path/to/mymx:/mx -d store/intersystems/iris-community:2020.1.0.202.0

$ docker exec -it myiris iris session iris

USER>do $System.OBJ.ImportDir(“/mx”,”vmx.ro”,”ck”,,1)

USER>do ^ZSTU

On clients side (any comp with Windows & MS Excel) :

  1. unzip MX to any folder

  2. open mx_confi.xlsb, see sheet ‘mx-sea-battle’, row 59

  3. change ‘localhost’ in row 59 to IP4-address of mx-server (example : 192.168.1.106)

  4. save this workbook

Run mx-sea-battle.xlsb, then press button 59 to connect with IRIS.

To see what is hidden under bonnet on the client side, just click ‘design’ icon on the top panel.

Under Windows, mx-server and mx-client can be the same comp, row 59 as is.

Best wishes

Version
1.0.018 Mar, 2020
Category
Technology Example
Works with
CachéInterSystems IRIS
First published
18 Mar, 2020
Last checked by moderator
27 Jun, 2023Works