Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

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 http://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

Python, Programming

  • Category:- Python
  • Reference No.:- M91796573

Have any Question?


Related Questions in Python

Environment setupthe first mini project will be based on

Environment Setup The first mini project will be based on Ladder Logic programming. We will be using Schneider Electric's IDE called SoMachine Basic to do the programming. The latest ver- sion of SoMachine Basic for Wind ...

In this programming assignment you will write a client

In this programming assignment, you will write a client pingprogram in Python. Your client will send a simple ping message to a server, receive a correspondingpong message back from the server, and determine the delay be ...

Sieve of eratosthenes in pythonthe goal is to find all the

Sieve of Eratosthenes (in Python) The goal is to find all the prime numbers less than or equal to some natural number maxn. We have a list that tells us if any of the numbers 0..maxn are "marked". It can be an array of b ...

Simple python traffic lightswrite a program that simulates

Simple Python (Traffic lights) Write a program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green. When a radio button is selected, the light is turned on, and onl ...

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

Quesiton write a python script that counts occurrences of

Quesiton: Write a python script that counts occurrences of words in a file. • The script expects two command-line arguments: the name of an input file and a threshold (an integer). Here is an example of how to run the sc ...

Part i the assignment filesone of the most important

Part I: The Assignment Files One of the most important outcomes of this assignment is that you understand the importance of testing. This assignment will follow an iterative development cycle. That means you will write a ...

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

Below zero - ice cream storethe local ice-cream store needs

Below Zero - ice cream store The local ice-cream store needs a new ordering system to improve customer service by streamlining the ordering process. The manager of the store has found that many orders are incorrect and s ...

Question write a simple python program that takes use

Question: Write a simple python program that takes use inputs as non-zero digits and converts them into binary form. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As