Implement a battleship game in python

Assignment Help Python Programming
Reference no: EM131072212

Battleship!

Assignment Summary: Battleship is a children's game where players guess (x,y) coordinate positions of the opposing player's ship pieces in a 10x10 grid. For the official Hasbro rules and additional game context, read https://www.hasbro.com/common/instruct/Battleship.PDF . You will implement a version of this game in Python.

It is highly recommended that you read the entire assignment first to get an idea of what the end-goals are, which will help in designing your code.

This assignment is divided into five required stages and optional sixth stage. Each succeeding stage is built upon what you have already written for the previous stage. We expect you to design, write, and test this program according to these stages-first get the first-stage program working, then modify it to satisfy the second stage, and so on. As always, be sure to keep a copy of each completed stage. That way, if you decide you've gotten off on the wrong track for a stage, you can start again easily from the end of the previous stage, without the painstaking task of removing each addition. You should make sure that each stage is entirely correct and working perfectly before you go on to the next. As you complete each stage, you should demonstrate briefly to your TA or tutor that it works correctly before you go on to the following stage.

Development by stages is good software engineering practice. It is far better to have a program that is correct but incomplete (i.e., it doesn't implement all the features but what it does implement is correct) than one that contains bugs. Grading for this assignment will reflect this, too; it will hurt your score much more to turn in buggy code than not to reach some of the later stages. Let's say that again: Your score will be higher if you do the first few stages correctly than if you do all of them with bugs in them.

Tips and Advice

• Take time to draw out and design your code! Don't start coding immediately until you know the overall organization and structure of the components you want to implement. This will significantly help you during implementation.

• Get started early! There are a lot of parts to this lab and additions to make for each stage. You will need ample time to complete this assignment and will most likely require you to get started early (including finding a partner on Monday and utilizing all lab sections).

• Save multiple versions of your project! Since each stage builds upon each other, you may make changes that can break your current functionality. In the worst-case scenario, you made modifications in your file, broke the code, and now nothing works. By saving several versions of your progress, you can always start from a later point rather than trying to start all over.

• Create game.txt versions (or be sure to save versions for specific scenarios) that allow you to test various cases. For example, if you're working on confirming the functionality for the end-of-game (printing stats, checking logic, etc.), it will be extremely annoying to replay an entire game just to get to that point. Imagine trying to debug an edge case at the end of the game and having to start a new game, hit all player ships just to reproduce the condition, realize the bug is still not fixed, and then replaying the game again... it will be wise to play with the game once, load a game.txt file as discussed in Stage III that has a near-complete game, and then testing the end-game conditions.

Attachment:- Assignment.rar

Reference no: EM131072212

Questions Cloud

Compute his earnings for his lifespan : Plot the two earnings functions you have computed. During what year does John pass Ivan?
Determine the optimal number of employees : Determine the optimal number of employees
A strategic view of industrial and organizational markets : What are the chief differences between consumer-goods marketing and business marketing? Use the following matrix as a guide in organising your response! (please be specific)
Determine the optimal employment level for this firm : If the price of output is still fixed at $300, and the productivity of workers is still defined by the data in the second row, draw the VMPL curve, insert the supply limit and determine the equilibrium wage.
Implement a battleship game in python : Assignment Summary: Battleship is a children's game where players guess (x,y) coordinate positions of the opposing player's ship pieces in a 10x10 grid. For the official Hasbro rules and additional game context, read http://www.hasbro.com/common/i..
The marvelous gadget company llc : A strong business plan for the start-up of a new business is essential in bringing in investment and demonstrating a viable idea in an attractive way. The assignment is to present a business plan for setting up a manufacturing plant for small kitc..
Determine the optimal number of workers to be employed : Determine the optimal number of workers to be employed
Calculate the equilibrium wage and employment level : Compute the transfer earnings and rent components of the total wage bill.
Show the contents of a single environment variable : CIS 240 - What command would you use to remove job number 5 from your default print queue and what is the absolute pathname of the file which defines aliases available to ALL users?

Reviews

Write a Review

Python Programming Questions & Answers

  Create an inheritance relationship between two classes

For this assignment you will create a simple class hierarchy. You will create an inheritance relationship between two classes -- a Friend class and a Person class - Friend will inherit Person

  Write a non-fruitful function drawequitriangle

Write a non-fruitful function drawEquitriangle(someturtle, somesize) which calls drawPoly from the previous question to have its turtle draw a equilateral triangle

  Project- add time and object interaction to the simulation

Project: Add Time and Object Interaction to the Simulation. Bring the simulation to life with simulated time and object interaction. Illustrates the alternative flow of control for errors provided by try/catch in place of returned error codes

  Look up terms in a tech dictionary

Create a program that allows a user to look up terms in a tech dictionary - programming or scripting that is of interest to you, and complete one or more web-based tutorials on the topic.

  Q1if we knew all the ecological social and competitive

q1if we knew all the ecological social and competitive forces that regulate populations and in reality we couldnt what

  You are tasked with improving the code for the haunted

you are tasked with improving the code for the haunted house game. please read the associated hand-out and the code

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Creation of a program that will assemble dna chains

The aim of this assignment is the creation of a program that will assemble DNA chains, using the fragments given

  Write a python program that reads a dumbbasic program

You should write a Python program that reads a DUMBBASIC program from standard input1, and prints the results of executing that program to standard output.

  Integration of mnch commodities supply chain management

Objective of the study is to examine the outcome of integration of logistic and supply chain management of MNCH commodities on service delivery, specific objectives have been set to achieve the aim of the study.

  Implement your algorithm in python

Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified and reinforce topic material related to the programming work cycle, and the input, processing, output program structure.

  Write a function that will take two arguments

Write a function that will take two arguments: a word to be searched for and a list of strings containing the grid and write code to read, in turn, each line of the file, remove the newline character and append the resulting string to a list of stri..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd