Ready Player Zero

This post has been republished via RSS; it originally appeared at: Excel Blog articles.

Repeated tasks can slow down your efficiency but with Office Scripts in Excel for the web, you can automate your day-today tasks. In just a few simple steps, you can easily create a script and then share with your coworkers to automate your organization’s workflow.  While you can use Office Scripts to be more productive at work, we’d like to show how you can use Office Scripts for fun! 

 

To demonstrate the breadth and depth Office Scripts offers (and just for fun)we built Game of Life simulator. The Game of Life, also known simply as Life,” is a cellular automaton devised by 1970’s British mathematician, John Horton Conway. It is a zero player game, meaning that its evolution is determined by its initial state, requiring no further input. You simply create, sit back, and watch the evolution unfold.  

 

17c/45_Reaction, 16x5 (17c45reaction.rle)17c/45_Reaction, 16x5 (17c45reaction.rle)

 

Here are the steps to create your own zero-player game:

  • Create a new workbook in Excel on the Web. 

  • Open the “Automate” tab. 

  • Press the "New script" button. 

  • Copy the code from game-of-life.ts and paste into the Code Editor (optionally, rename the script as "Conway's Game of Life”).

  • Hit the “Run” button above the code editor. 

  • After a few seconds of churning (downloading the pattern rule and setting up the game board), a small "glider" will come to life and start to travel across the worksheet.  

 

Below are some examples of different Game of Life patterns - note the frame rates have been adjusted for demonstration purposes.


Maze wickstretcher, 6x8 (mazewickstretcher.rle)Maze wickstretcher, 6x8 (mazewickstretcher.rle)

 

2x2 Block Oscillators, 26x2 (2x2blockoscillators.rle)2x2 Block Oscillators, 26x2 (2x2blockoscillators.rle)

 

Baker, 16x14 (baker.rle)Baker, 16x14 (baker.rle)

 

B3578/S238 Replicator, 7x7 (b3578s238replicator.rle)B3578/S238 Replicator, 7x7 (b3578s238replicator.rle)

 

To learn more about Office Scripts and Game of Life:  

 

We’d love to hear from you and look forward to seeing how you use Office Scripts in your workflows.  Happy scripting!

 

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.