Giter VIP home page Giter VIP logo

excelminesweeper's Introduction

Excel Minesweeper

Hey, so this is a smaller project of mine, where I tried to make a minesweeper clone in Excel. It contains all the features of the original, and could be a fun side project to do yourself.

Preview

How to play

Clicking on the R cell will reset the game (or start it with the defined parameters). The first number is the amount of mines on the board, and the second number is the board size. Double clicking does work, however, if there's not many mines on the board, it will sometimes not clear the whole area (pretty sure this is a problem with Excel).

How to make it yourself

First off, open Excel and create a blank sheet. If you can't see the Developer tab on the top ribbon (where you have Home, Insert...), go to File -> Options (all the way at the bottom of the left panel). This will open up the Excel Options window. Here, go to the Customize Ribbon Tab, and in the right list, make sure that Developer has a checkmark next to it.

Make sure there's a checkmark next to Developer

To actually load the code, open the Developer tab and click on View Code.

Click on View Code here

This will open up a new window called Microsoft Visual Basic for Applications, and you're already going to have a Window open within it, probably called Sheet1 (Code). Here, you have to paste the gameMain script.

Paste in the gameMain script

There's one more thing you need to do, and that's add a module. In the file structure window at the left, right click, Insert -> Module.

Add a module here

This will open a new window, and here you simply paste the code from specialLine and press Enter. Now you are ready to go. Click on the play button at the top, and in the new window that pops up, click Run.

Click on play

Now return back to your Excel file, and the game should be running.

I believe you can only save the file as a macro, and every time you open it, you have to go to the dev bar, view code and run it manually.

I tried to comment the main code, so you can look through that if you'd like. The specialLine code is just a simple line which allows right clicking (I think).

excelminesweeper's People

Contributors

zesardine avatar

Stargazers

 avatar Ellie 
:3 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.