teknero.blogg.se

Excel vba shipit json
Excel vba shipit json




  1. #EXCEL VBA SHIPIT JSON INSTALL#
  2. #EXCEL VBA SHIPIT JSON CODE#

If you find a bug, or have a feature request, you will want to open an issue. Unfortunately, it won't, because of the Win32API calls used in the shape animations and AIPlayer delays. The ships (and their respective length) are: Once a player has found and destroyed all 5 enemy ships, the game ends: If you're playing grid 2, you cross your fingers while the AI picks a position to begin the game if you placed your ships in grid 1, you double-click a cell in grid 2, and then the AI will play.Īs the game progresses and you sink enemy ships, specifically which ships you've taken down will appear in the "acquired targets" box under the opponent's grid. The goal is to find and sink all enemy ships before they find and sink all of yours. your AI opponent has already done the same and the game is ready for Player 1 to begin: Double-click to confirm the position when you're ready to place the next ship - the ships you've placed will appear in the "Fleet Status" box: Click anywhere in the grid to preview if the preview isn't where you thought it would be, try rotating the ship by right-clicking. To place a ship, select the location of its top-most, left-most position. To play the worksheet UI (other implementations may work differently), you can follow the in-game instructions: Tends to avoid shooting in positions adjacent to previous known hits if it's not hunting a ship down. Will not shoot a position where the smallest possible ship it's still looking for, wouldn't fit at that position horizontally or vertically.

excel vba shipit json

Then proceeds to destroy it, then resumes the hunt. Merciless shoots in random-ish patterns targeting the center and/or the edges of the grid, until it finds a ship to sink.Then proceeds to destroy that ship, then keeps shooting at random until it finds another ship to destroy, until it wins the game. FairPlay shoots at random everywhere it can, until an enemy ship is found.Random shoots at random everywhere it can, until all enemy ships are found.Just implementations of various strategies for winning a Battleship game. Otherwise, the first step is to pick a UI - at this point there's only a "Worksheet" UI, so you click it and you're taken to the "Game" screen, where you pick the grid you want to play in, knowing that Player 1 always shoots first: If macros are disabled, the title screen should look like this:

#EXCEL VBA SHIPIT JSON INSTALL#

You need a desktop install of Microsoft Excel with macros enabled.

#EXCEL VBA SHIPIT JSON CODE#

You will not be able to run the unit tests without Rubberduck ( Assert calls will fail to resolve), but you can absolutely run and explore this code without the most powerful open-source VBIDE add-in out there. that's true whether it's this project or any other!), be it only to enjoy navigating all these classes in a treeview with a customized folder hierarchy. But you're definitely going to have a much better time with Rubberduck (although.

excel vba shipit json

For VBA programmers, it makes a project to study and play with, to see how VBA can be used to write object-oriented code, and how MVC architecture can be leveraged to implement complex but very organized, extensible applications.

excel vba shipit json

Something to play with and have fun with, something to learn with, something to share, something to enhance and extend for fun, because we can, because VBA is fully capable of doing this, and because VBA devs can do open-source on GitHub, too!įor Rubberduck contributors that know C# but don't do any VBA, this makes a decent-sized project to integration-test Rubberduck with. Many options! For me, the out of the box-ness and simplicity for desktop end users was just such an overwhelming positive to the overall process that it actually meant VBA was the right choice for my problem.A fully OOP, Model-View-Controller (MVC) architecture implementation of the classic Battleship board game, running hosted in Excel, written in VBA to demonstrate the language's little-known OOP capabilities. VBA - out the box experience, just works for the desktop end user, but you are writing in a language that Microsoft have on life support that is only really supported for legacy reasons. Sharing and script management is a bit weird too.

excel vba shipit json

Office Script - get up and running very quickly and easily with vanilla javascript, but limited to web excel. You could mitigate some of this by hitting a web api instead or something. Have Excel launch an external tool, similar to the above but more flexible, also additional concerns (i.e. xll that needs to be managed and distributed. You will know best for your requirements.Ĭ#/C++ add-in - powerful, but couples you to an. I found none is really perfect and you must choose your best compromise. There are quite a few choices for this kind of problem, each option has benefits and drawbacks.






Excel vba shipit json