Github-Pages rendering at rubberduck-vba.github.io
rubberduck-vba / battleship Goto Github PK
View Code? Open in Web Editor NEWAn Object-Oriented VBA experiment
License: MIT License
An Object-Oriented VBA experiment
License: MIT License
It could avoid adjacent ships 90% of the time, but not making it systematic would add to the unpredictability of the strategy.
In order to extend the game with different/custom modes (e.g. Salvo mode), the GameController logic around alternating player turns needs to be extracted to some IGameMode
interface that is implemented by a ClassicMode
class for the current logic, and could eventually be implemented by a SalvoMode
class.
Rubberduck 2.4.0 (re-)introduced module/member attribute annotations; the code should be updated to reflect proper usage; a number of @Description
annotations are illegal, module-level ones need to become @ModuleDescription
annotations, and @PredeclaredId
is missing in a number of classes.
The appearance of the "HIT!", "MISS", and "SUNK" labels/shapes will be different than intended on machines that don't have the font that was intended. Cutting the shapes and re-pasting them as images should fix it (making sure they keep the same name).
Excel 2013+ seems to have a bug such that if you Freeze Panes and zoom in so that the freeze line is out of sight it starts to recalculate the worksheet's display constantly thereby causing high CPU load. In order to limit the scroll area and keep the battle fields on display use the worksheet property ScrollArea and limit to $A$1:$AF$32 as in the attachment.
Excel2013up-bug_frozenPanesOutOfSight.xlsx
Win32 API calls need to be adapted to work on a Mac.
Quick-Fix:
To run on Excel 2รร7, theLongPtr
's in Win32API-Module need to be changed to Long
.
TextFrame in GameSheet.ShowInformation is missing property .VerticalOverflow, Comment it out and game runs.
Conditional-Compling onVBA7
forLongPtr
and onVersion
for the missing property should solve that issue. I'll try over next week.
The game should be extended with a dynamic UserForm UI that implements the IGridViewCommands
interface and offers a completely different user experience.
In a human-vs-AI game, there should be some configuration at the beginning of a game, that lets you pick whether the "acquired targets" box is...
Replace @Testmethod with @Testmethod("XXX"), where XXX - name of the module without the "Test" suffix to show test categories in the test explorer.
Given that almost all the modules are host-agnostic (kudos!), it should be possible to aฤd a .vbp and a new view to allow the same codebase to be compiled as a standalone executable. Bonus points for adding CI with unit tests :-)
Could you use Compiler Directives to require the Rubberduck add-in only during Unit Testing?
#Const UnitTestMode = False
Public Const UnitTestMode As Boolean = False
#If UnitTestMode Then
Private Assert As Rubberduck.AssertClass
#Else
Private Assert As Object
#End If
Currently blocked by #7
Once there's an IGameMode
interface, the game needs a SalvoMode
implementation so that each turn consists of:
The GridState
enum could have a MarkedPosition
value that recycles the InvalidPosition
member's value, which is currently only used in the deployment phase. Because of Worksheet UI limitations with the conditional formatting of the grid, no new enum values can be added.
When the game ends, it should be possible to start a new game directly from the game screen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.