Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Please: For this assignment you will program a GUI version of a basic one player game of Battleship. The design of the GUI and
Python Please:
For this assignment you will program a GUI version of a basic one player game of Battleship. The design of the GUI and the method of user input are up to you.
The play field is represented as a X grid of cells. Each of the ships may take up one or more cells. The ship sizes are:
Ship cells
Ship cells
Ship cells
Ship cells
Ship cells
At the beginning of the game, the computer will randomly place each of the ships on the playfield. Each ship must be fully on the playfield and no two ships may overlap. Ships may occupy adjacent shells, but two ships may not share the same cell.
The user is then prompted to choose a cell and the playfield is updated accordingly if the users guess misses or hits a ship. When each cell of a ship has been hit, that ship is sunk. Once all ships have been sunk, the game is over and the total number of guesses the user made is displayed.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started