Coder Social home page Coder Social logo

battleships's Introduction

Battleships project

This project is an excercise in designing and building C# solutions

Assumptions

  • The game is conducted between 2 players
  • The game takes place on a 10 x 10 board
  • There are 10 ships placed on the board (4 x 2 field long ships, 3 x 3 field long ships, 2 x 4 field long ships, 1 x 5 field long ships)
  • The ships can be placed on the field in a way that they will not fall out of bounds of the board in whole or in part
  • The ships can be placed next to the boarde of the board (i.e. fields A1, A10, J10)
  • The ships cant be placed next to other ships (they have to have at least 1 field space from other ships in all directions)
  • Second (and subsequent) miss on a previously aimed field yields same results as on first shot resulting in lost turn
  • Second (and subsequent) hit on a previously hit ship field yields same results as on first shot resulting in lost turn
  • Game safety (cheating) was not a concern, if that would be a concer additional interfacing layer would be necessary on top of the business logic

Projects

  • Tests
    • BattleshipsAIPlayerTests - contains tests for the AI player
    • BattleshipsTests - contains tests for the business logic
  • Battleships - contains business logic for the game (rules)
  • BattleshipsAIPlayer - contains AI player logic
  • BattleshipsConsole - presentation of a game based on two AI players

battleships's People

Contributors

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