{"id":47129450,"url":"https://github.com/jonkspanda/devops22-battleships","last_synced_at":"2026-03-12T20:01:19.970Z","repository":{"id":178162197,"uuid":"541979181","full_name":"JonksPanda/devops22-battleships","owner":"JonksPanda","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-07T13:37:37.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-11-07T14:41:07.034Z","etag":null,"topics":["battleship","battleship-game","python","school-assignment","school-project"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonksPanda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-09-27T08:24:44.000Z","updated_at":"2022-12-18T00:36:50.000Z","dependencies_parsed_at":"2023-11-07T14:38:38.092Z","dependency_job_id":"12348ecf-5b0e-4be9-97c2-96f127bdc46e","html_url":"https://github.com/JonksPanda/devops22-battleships","commit_stats":null,"previous_names":["jonkspanda/devops22-battleships"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/JonksPanda/devops22-battleships","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonksPanda%2Fdevops22-battleships","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonksPanda%2Fdevops22-battleships/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonksPanda%2Fdevops22-battleships/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonksPanda%2Fdevops22-battleships/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonksPanda","download_url":"https://codeload.github.com/JonksPanda/devops22-battleships/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonksPanda%2Fdevops22-battleships/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30441855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battleship","battleship-game","python","school-assignment","school-project"],"created_at":"2026-03-12T20:00:29.406Z","updated_at":"2026-03-12T20:01:19.960Z","avatar_url":"https://github.com/JonksPanda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devops22-battleships\n\n## Description\nThis battleship game is made as an examination-project for a Python-Course. For now, you can only play singleplayer vs AI. \nThe program is written in Python and uses some SQL\n\n---\n## How to run the game\n\nStart main.py to run the game properly.\n\n---\n## How to play\n\nX\n: Horizontal\n\nY\n: Vertical\n\nDirection\n: left, right, up, down\n\n1. Place ships on your board. Enter X-coordinate, Y-coordinate and direction. Ex. (6,7,down)\n  - Rules:\n   - The whole ship must be on the board\n   - Ships can't be place on top of each other\n   - Ships can't be placed adjacent to each other\n2. Shoot opponents on board. Enter X-coordinate and Y-coordinate to decide where to shoot. Ex. (3,4)\n  - Rules:\n    - If a target is hit. The player can shoot again, until miss\n    - The same coordinate can't be shot twice\n3. First to destroy all opponent ships wins.\n\n---\n## Extra features added\n- \"Smarter\" AI\n- Automatic ship-placement for AI\n- Statistics\n- History of previously played games (winner, how many turns it took and time/date(Note that the timestamp is broken. It the returns time from wrong timezone))\n\n---\n## To do-list\n\n- [x] Create Repo\n- [x] Make new branch\n- [x] Make a plan on how to structure program\n- [x] Add all python-files neccesary for the base\n- [x] Code the base\n  - [x] Create a board-generator\n  - [x] Create a function to place all ships on board\n    - [x] Let player input placements\n    - [x] add so that AI can put ships on board\n    - [x] add a funtion to read file with AI-placements\n  - [x] Add funtion to let player shoot ships on board\n    - [x] Add so that AI also can shoot the players ship on board\n  - [x] Add function that that register who won and how many tries it took\n- [x] Add extra-stuff\n  \n---\n## Structure\n\n- main.py\n  - Runs the program and adds neccessary folders\n- menu.py\n  - Main menu for the game\n- board.py\n  - Store functions related to displaying and populating the players board\n- player.py\n  - Where player and AI class is\n  - All player/AI-related logic is here\n- game.py\n  - Prepares the game-settings and runs the game-loop\n- statistics.py\n  - SQL-related stuff. Shows general stats from games\n\n---\n## Possible Improvements\n\n- Color to make features on board more visible\n- ~~Ability to exit game~~\n- Ability to save game","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkspanda%2Fdevops22-battleships","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonkspanda%2Fdevops22-battleships","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkspanda%2Fdevops22-battleships/lists"}