{"id":21344211,"url":"https://github.com/thaikoz/warships","last_synced_at":"2025-03-16T03:21:03.260Z","repository":{"id":246225553,"uuid":"806464310","full_name":"ThaikoZ/warships","owner":"ThaikoZ","description":"\"Warships\" is a classic battleship game where two players attempt to sink each other's fleets. Each player has a 10x10 grid on which they place their ships. The objective of the game is to guess the coordinates of the opponent's ships and sink them before the opponent sinks yours.","archived":false,"fork":false,"pushed_at":"2024-07-05T17:26:37.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T16:09:27.886Z","etag":null,"topics":["cpp","oop","visual-studio"],"latest_commit_sha":null,"homepage":"","language":"C++","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/ThaikoZ.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T08:49:46.000Z","updated_at":"2024-07-05T17:26:41.000Z","dependencies_parsed_at":"2024-06-26T17:36:18.593Z","dependency_job_id":"0ee2a602-3500-4ba9-9715-946265bddca4","html_url":"https://github.com/ThaikoZ/warships","commit_stats":null,"previous_names":["thaikoz/warships"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaikoZ%2Fwarships","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaikoZ%2Fwarships/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaikoZ%2Fwarships/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaikoZ%2Fwarships/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThaikoZ","download_url":"https://codeload.github.com/ThaikoZ/warships/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243819299,"owners_count":20352866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpp","oop","visual-studio"],"created_at":"2024-11-22T01:17:49.758Z","updated_at":"2025-03-16T03:21:03.232Z","avatar_url":"https://github.com/ThaikoZ.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Warships - Battleship Game\n\n## Table of Contents\n1. [Game Description](#game-description)\n2. [Game Rules](#game-rules)\n3. [Installation Instructions](#installation-instructions)\n4. [Launching the Game](#launching-the-game)\n5. [Controls](#controls)\n6. [Author](#author)\n7. [License](#license)\n\n## Game Description\n\n\"Warships\" is a classic battleship game where two players attempt to sink each other's fleets. Each player has a 10x10 grid on which they place their ships. The objective of the game is to guess the coordinates of the opponent's ships and sink them before the opponent sinks yours.\n\n## Game Rules\n\n1. **Setting Up Ships**:\n    - Each player has a fleet consisting of the following ships:\n        - 1x Aircraft Carrier (5 cells)\n        - 2x Battleship (4 cells)\n        - 3x Cruiser (3 cells)\n        - 2x Destroyer (2 cells)\n    - Ships can be placed horizontally or vertically, but they cannot touch or overlap.\n\n2. **Gameplay**:\n    - Players take turns guessing coordinates on the opponent's grid (e.g., A5, C3).\n    - If a guess is a hit, the player marks it on their hit grid.\n    - The game ends when all ships of one player are sunk.\n\n## Installation Instructions\n\nTo install the game \"Warships\", follow these steps:\n\n1. **Download the repository**:\n    ```bash\n    git clone https://github.com/ThaikoZ/gra-w-statki.git\n    ```\n2. **Navigate to the game directory**:\n    ```bash\n    cd gra-w-statki/gra-w-statki\n    ```\n3. **Compile the project**:\n    ```bash\n    g++ -o gra-w-statki gra-w-statki.cpp Game.cpp Player.cpp Ships.cpp ShipsInConsole.cpp Engine.cpp\n    ```\n\n## Launching the Game\n\nTo start the game, use the following command in the terminal:\n\n```bash\n./gra-w-statki\n```\n\n## Controls\n\n- **Setting Ships**: Enter the starting and ending coordinates of the ship.\n- **Attack**: Enter the coordinates of the cell you want to attack (e.g., B7).\n\n## Author\n\n- **Adrian Sudak** - Project author.\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\n\n## Technical Description\n\n### Directory Structure\n\n```\ngra-w-statki/\n│\n├── gra-w-statki/           # Project directory\n│       # Header files\n│   ├── Player.h\n│   ├── Ships.h\n│   ├── ShipsInConsole.h\n│   ├── Game.h\n│   └── Engine.h\n│       # Source files\n│   ├── gra-w-statki.cpp\n│   ├── Player.cpp\n│   ├── Ships.cpp\n│   ├── ShipsInConsole.cpp\n│   ├── Game.cpp\n│   └── Engine.cpp\n└── README.md               # README file\n```\n\n### Technologies\n\n- **C++** - Main programming language\n- **Console** - User interface\n\n### Sample Code\n\n#### gra-w-statki.cpp\n```cpp\n#include \"ShipsInConsole.h\"\n\nusing namespace std;\n\nint main() {\n    ShipsInConsole ships;\n    ships.play();\n\n    return 0;\n}\n```\n\n## Notes\n\nThis project is part of the Object-Oriented Programming course requirements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthaikoz%2Fwarships","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthaikoz%2Fwarships","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthaikoz%2Fwarships/lists"}