Hi! My name is Graham. In this README page were you will find out a little about me, my website, my coding journey, my projects and who has influenced me in the development of this website.
This is my third course project, by now I have gained a little more experience but still very much a novice. Of the options for this project I thought a Battleship would be fun with the challenging as this is one of my favourite games.
I hope you have fun.
My aim or goal with this project is to not only complete my course objective but to also create a game, my very first, that is both functional and fun to play. As a big fan of the game battleships, I was eager to prove to myself that i could achieve my goal and hope that with further development of my coding skills, I cam add to this game and it can evolve with me.
A flow chart for this game created with the help of Lucid Web-Site
My design for this battleship game in Python is a very basic game, it follows the traditional rules and layout. I went for a numbers layout both horizontal and vertical as I found it a easy and simple of game operation based on the idea of naval coordinates.
The start of the game the players name is requested then the player is welcomed to the game and given the rank of Fleet Commander and that there ships await orders, then a countdown starts, adding some animation to contact the ships.
At this point the declaration of war is made, below that the player will see a grid map of the game. The player is requested to get there navy ready for battle by requesting the coordinates for the ships. Each player has 6 ships in different length, firstly the player is asked for the coordinates for ship of length 5 meaning thats the size of that ship, after the player enters these coordinates the player will be requested the coordinates of the next ship until all 6 ships have there coordinates set.
After you enter the coordinates for all the ships, the player will be show a grid map of there ships indicated with the letter (o). And now the game begins. The player is now asked for there first firing coordinates.
From now, both the player and computer will takes turns firing at the others board until all one player hits all the others ships.
The top grid is the players and the bottom is the computers, you can see that the player entered the coordinate 25, which was a miss and is now marked with an (o). if it was a hit it will be marked (X).
All my projects are also available to view on my portfolio website. www.grahamwilliamson.ie
Code continuously tested my throught the process.
As each bit of code was tested throughout, any bugs found were corrected. To ensure this tasks efficiency, the functionality of the code was check regularly.
There is an end of game error that I couldnt fix, I reached out on Slack but got no reply/help. This error wont reset the game fully, slack link to question below:
This bug remains.
The project started to be developed by cloning the mock terminal repository provided by the Code Institute. The cloning phase of the project is as follows:
Go to the GitHub repository to be cloned. Click the ‘Use this template’ text and and then click ‘Create a new repository’ in the dropdown menu that opens.
The following will open on a new page. After specifying the repository name, you can create the repository without writing a description. The new repository will be created automatically.
Then, if you want, you can open with the GitPod or clone it to your computer and work on locally. Since I am running locally, I will explain how I cloned it to the computer. As in the first step, we press the ‘Code’ button, open the dropdown menu and copy the link indicated by the arrow.
Then, we open the terminal application we use from the computer and clone the repository to our computer with the ‘git clone -link to be cloned-‘ command. Then you can develope your work using the source-code editor of your choice.
To fork a GitHub repo, see the Fork a GitHub repo documentation.
I hope I have achieved my objective on this project and created a game of my own work and design but I cant be 100% certain as I have watched several tutorials on youtube and read a lot of articles online for which I may have taken an idea or two. To ensure proper credit is given to all, I have listed the youtube channels I followed for this project below: