{"id":19525468,"url":"https://github.com/chayaroten/annak","last_synced_at":"2026-02-13T18:34:06.393Z","repository":{"id":261402962,"uuid":"884170184","full_name":"chayaRoten/Annak","owner":"chayaRoten","description":"Annak is a strategic board game inspired by Catan, developed in C++ with an interactive OpenCV GUI. ","archived":false,"fork":false,"pushed_at":"2024-11-06T10:51:35.000Z","size":25104,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T14:09:12.971Z","etag":null,"topics":["cpp","opencv"],"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/chayaRoten.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-11-06T09:21:21.000Z","updated_at":"2024-11-09T18:34:27.000Z","dependencies_parsed_at":"2024-11-06T11:55:47.024Z","dependency_job_id":null,"html_url":"https://github.com/chayaRoten/Annak","commit_stats":null,"previous_names":["chayaroten/annak"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chayaRoten/Annak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayaRoten%2FAnnak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayaRoten%2FAnnak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayaRoten%2FAnnak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayaRoten%2FAnnak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chayaRoten","download_url":"https://codeload.github.com/chayaRoten/Annak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayaRoten%2FAnnak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274589627,"owners_count":25312971,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cpp","opencv"],"created_at":"2024-11-11T01:04:38.168Z","updated_at":"2026-02-13T18:34:06.348Z","avatar_url":"https://github.com/chayaRoten.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Strategic Board Game - Catan Inspired\n\n## Overview\n\nThis project is a strategic board game inspired by the classic **Catan** game, developed in **C++** with an interactive **Graphical User Interface (GUI)** utilizing **OpenCV**. The game allows players to interact with a simulated world, gather resources, build estates, vehicles, and manage their growth.\n\nKey features of the game include:\n- Grid-based world with various types of tiles (e.g., resources, cities, roads)\n- Vehicle management for resource collection and movement\n- Construction and manufacturing of buildings\n- Command-based gameplay where players input actions in the form of commands\n- Automated game steps for simulation\n- Assertions and checks for game state\n\n## Features\n\n- **World Simulation**: The game world is represented as a grid where each tile can contain various elements, such as estates (cities, roads), vehicles (trucks, cars, helicopters), and resource tiles.\n- **Resource Management**: Players collect and deposit resources (e.g., wood, stone, etc.) in order to build and grow their world.\n- **Vehicle Interaction**: Vehicles can be used to transport resources across the grid, and players can move them around the world to gather or deliver resources.\n- **Building \u0026 Manufacturing**: The game allows for the construction of new buildings, such as cities and roads, and the manufacturing of goods.\n- **Command System**: Players can define steps and actions through a command file. These commands include actions like moving, building, manufacturing, and waiting.\n- **Interactive GUI**: OpenCV is used to render the world visually and show real-time updates on the game state.\n\n## Design Patterns Used\n\n3. **Command Pattern**: Commands (e.g., `MOVE`, `BUILD`, `SELECT`) are parsed from a file and executed as actions, promoting loose coupling between command input and game logic.\n5. **Singleton Pattern**: Global instances like the game world or the image rendering class can be made singletons to ensure there is only one instance throughout the game's lifecycle.\n\n## Requirements\n\n- **C++** (C++11 or higher recommended)\n- **OpenCV** (for GUI rendering)\n- A C++ compiler (e.g., GCC, Clang, MSVC)\n- A text editor or IDE for editing the code\n\n### Optional Dependencies:\n- **JSON Library**: For reading configuration files (such as tile information).\n  \n## How to Run\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository_url\u003e\n   cd \u003cproject_directory\u003e\n   ```\n\n2. Compile the project using a C++ compiler. If you're using **g++**:\n   ```bash\n   g++ -std=c++11 -o game main.cpp -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc\n   ```\n\n3. Run the game:\n   ```bash\n   ./game\n   ```\n\n4. The game will automatically load an input configuration file (`input.txt`) containing the commands for starting and running the game. You can modify this file to experiment with different scenarios.\n\n## Game Rules\n\n- **Start**: The game starts by reading the input file, which contains a list of commands to initialize the game world, build estates, and spawn vehicles.\n- **Turns**: After starting, the game proceeds by processing steps from the input file. Each step can involve selecting tiles, building structures, moving vehicles, or gathering resources.\n- **Waiting**: Some commands, such as `WAIT`, will pause the game for a given number of turns.\n- **Resource Management**: Players must manage their resources efficiently to build new structures or vehicles and expand their influence on the grid.\n  \n## Commands\n\nThe game uses a command-based system to drive the gameplay. The available commands include:\n\n- **SELECT x y**: Select a tile on the grid.\n- **BUILD type x y**: Build a structure of the specified type (e.g., City, Road) at coordinates (x, y).\n- **MOVE x y**: Move a vehicle from one tile to another.\n- **MANUFACTURE type x y**: Manufacture a product at a given location.\n- **WAIT turns**: Wait for a specific number of turns.\n- **RAIN turns**: Simulate rain, which may affect resources.\n\nCommands are read from a text file (e.g., `input.txt`) and executed step-by-step.\n\n## Game World\n\nThe game world consists of a grid where each tile can contain:\n- **Empty Space**\n- **Estate**: Can be a city, village, or road.\n- **Vehicle**: Can be a car, truck, or helicopter.\n- **Resource Tile**: Contains resources like wood, stone, etc.\n\nEach entity can interact with others, like vehicles collecting resources or buildings being constructed.\n\n## Example Commands (`input.txt`)\n\n```txt\nSTART\nSELECT 1 1\nBUILD City 2 2\nMANUFACTURE People 3 3\nWAIT 2\nMOVE 2 2 3 3\nTAKE_RESOURCES\nASSERTS SelectedCategory\n```\n\n## Contributions\n\nContributions are welcome! Feel free to fork the repository, submit issues, and open pull requests.\n\n## Contact\n\nIf you have any questions or suggestions, feel free to open an issue or contact the project maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchayaroten%2Fannak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchayaroten%2Fannak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchayaroten%2Fannak/lists"}