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

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  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.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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