Code Monkey home page Code Monkey logo

battleshipjava's Introduction

#BattleShip Java Game

With your pair programming partner and table team, design a 2-D array of 5 rows and 5 columns.�

Divide your table team so that each pair programming team designs (pseudo code), codes, and tests 1 of the following components of Battleship:�

A.) Using a random number generator, populate the 5 x 5 board with “battleships” (use 1’s & 0’s to simulate)

B.) Request the user to enter a location where a battleship may be found (ask for row and column location). Keep track of all the user’s guesses (hint: store them in another 2D array)

C.) Validate the user input, and check to see if a battleship has been “hit”. Re-draw the board with the battleships, and show the user all of his / her guesses so far.�

Create “method stubs” for the missing methods, and test your own method with hardcoded values returned from the method stubs.� As each pair programming team finishes testing their method, add the method to your program, and re-test.� Continue this process until entire table has tested entire program. Good luck!

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.