Coder Social home page Coder Social logo

battleship's Introduction

rubberduck-vba

Github-Pages rendering at rubberduck-vba.github.io

battleship's People

Contributors

imh0t3b avatar pchemguy avatar retailcoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

battleship's Issues

Some of the GameController logic needs to be extracted to a ClassicMode class

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.

Annotations need to be updated

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.

AttackResult shapes should be images

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).

Game won't run on Excel 2007

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 onVBA7forLongPtrand onVersionfor the missing property should solve that issue. I'll try over next week.

Needs a UserForm UI

The game should be extended with a dynamic UserForm UI that implements the IGridViewCommands interface and offers a completely different user experience.

"Acquired targets" gives away too much information

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...

  • Always hidden
  • Hidden until a ship is sunken (current human-vs-AI behavior)
  • Hidden until a ship is hit (current AI-vs-AI behavior)

Add VB6 build

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 :-)

Unit Testing - Compiler Directives

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

Add a "Salvo" mode

Currently blocked by #7

Once there's an IGameMode interface, the game needs a SalvoMode implementation so that each turn consists of:

  • "Marking" positions on the enemy grid (click to mark, right-click to un-mark).
  • Handle a double-click to confirm marked positions and shoot them all at once.
  • Number of positions to mark depends on the number of friendly ships still afloat.
  • Number of shots per ship could be configurable, e.g. Carrier could shoot 2 positions if unharmed, or 1 if damaged; or, each ship afloat gives player 1 position to mark per turn.

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.

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.