Python Intermediate Project Assignment: Learn How to make Battleships in under 15 minutes!

preview_player
Показать описание
Upgrade your python skills be creating the game battleships!

This will really test your understanding of 2d arrays in Python

Pre-reqs: Loops, Strings, Arrays, 2D Arrays, Global Variables, Methods

Find code below

Solution:
Рекомендации по теме
Комментарии
Автор

Such a great video!! Would you think to make this game for 2 players by using sockets? For example: console shows two game table. One of them is for placing own ships and they’re visible there. Other one is for shooting the rivals’ ships. Second player’s ships are invisible until you hit them. And vice versa for second player. Shots are made sequentially.

aybarsali
Автор

what ide are you using in the video?
btw, great vid!

nathank
Автор

how does the program turn the input (say A4) into positions on the array? Im having problems converting the A to a position as it is a alphabetic character

gummisnodd
Автор

If I would like to specify the ship sizes but still randomize ship placement. How would you implement that?
For example I would like 1 ship sized 2 squares, 2 ships sized 3 squares, 1 ship sized 4 squares and 1 ship sized 5 squares.

Oysteinholan
Автор

Hi I am using pycharm community edition and when i run the code it just is blank and then says:

" Process finished with exit code 0 "

jk-gbet