{"id":29311578,"url":"https://github.com/denniskapelles/c-structs-and-games","last_synced_at":"2025-07-07T08:15:24.100Z","repository":{"id":303273663,"uuid":"1014941693","full_name":"DennisKapelles/C-Structs-and-Games","owner":"DennisKapelles","description":"Small C projects demonstrating data structures, game logic, and user interaction using structs and dynamic memory.","archived":false,"fork":false,"pushed_at":"2025-07-06T19:19:13.000Z","size":18976,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T20:21:34.297Z","etag":null,"topics":["c","games","queues","structures"],"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/DennisKapelles.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,"zenodo":null}},"created_at":"2025-07-06T17:53:39.000Z","updated_at":"2025-07-06T19:19:16.000Z","dependencies_parsed_at":"2025-07-06T20:21:49.301Z","dependency_job_id":"7e72a57e-cbcc-42e4-8dad-e6a0fd9fda41","html_url":"https://github.com/DennisKapelles/C-Structs-and-Games","commit_stats":null,"previous_names":["denniskapelles/-","denniskapelles/c-structs-and-games"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DennisKapelles/C-Structs-and-Games","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennisKapelles%2FC-Structs-and-Games","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennisKapelles%2FC-Structs-and-Games/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennisKapelles%2FC-Structs-and-Games/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennisKapelles%2FC-Structs-and-Games/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DennisKapelles","download_url":"https://codeload.github.com/DennisKapelles/C-Structs-and-Games/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennisKapelles%2FC-Structs-and-Games/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264040973,"owners_count":23548077,"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":["c","games","queues","structures"],"created_at":"2025-07-07T08:15:21.902Z","updated_at":"2025-07-07T08:15:24.084Z","avatar_url":"https://github.com/DennisKapelles.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C Structs and Games\n\nThis repository contains small educational projects in the C programming language, focusing on the use of `struct` types to build interactive command-line applications. The programs include data structures like queues and game logic implementations such as Hangman and a simple turn-based strategy game.\n\nEach project demonstrates key concepts in procedural programming, dynamic memory allocation, and user-driven design.\n\n# Hangman Game\n\nThis project implements a simplified version of the classic Hangman word-guessing game in C.\n\n## 🕹️ How It Works\n\n1. **Player 1** inputs a secret word.\n2. The screen is cleared and **Player 2** tries to guess the word, one letter at a time.\n3. For each wrong guess, the remaining attempts counter decreases.\n4. If a guessed letter exists in the word, it is revealed in its correct positions.\n5. The game ends when:\n   - All letters are guessed correctly ✅\n   - The player runs out of attempts ❌\n\n## 🔧 Features\n\n- Converts all input characters to lowercase.\n- Checks for repeated guesses and informs the user.\n- Clears screen with `system(\"cls\")` or `system(\"clear\")` depending on OS.\n- Uses a helper function to check letter existence in word.\n\n## 🛠️ Requirements\n\n- C compiler (e.g. `gcc`)\n- Runs on Linux/Windows\n\n## 📦 Compilation\n\ngcc hangman_game.c -o hangman_game\n\n./hangman_game\n\n\n---\n\n\n# Linked List Queue Implementation\n\nThis project implements a FIFO (First-In-First-Out) Queue using a singly linked list in C.\n\n## 📋 Description\n\nThe program defines a `struct node` and allows the user to perform queue operations via a menu:\n\n- `Insert`: Add a new element to the end of the queue.\n- `Delete`: Remove and return the element at the front of the queue.\n- `GetNth`: Retrieve the value at a specific position in the queue.\n- `Count`: Count how many times a specific value appears in the queue.\n\n\n## 🖥️ Menu Options\n\nInsert\n\nDelete\n\nGet-Nth\n\nCount\n\nExit\n\n## 📦 Compilation\n\ngcc linked_queue.c -o linked_queue\n\n./linked_queue\n\n---\n\n\n# Strategy battle game\n\nThis project simulates a simplified two-player turn-based strategy game in C, involving unit purchasing, resource management, and combat strength.\n\n## 🧱 Structure\n\nA `unit` structure holds attributes like name, attack power, cost, upkeep, and quantity owned.\n\n\n## 🎮 Gameplay\n\nEach player takes turns to buy units (e.g. Peon, Grunt, Troll).\n\nWorkers generate money, military units consume money and increase attack power.\n\nThe game tracks each player’s money and army power.\n\nVictory is achieved when one player has:\n\nSignificantly more army power, or\n\nAccumulated enough money.\n\n## 🛠️ Features\n\nInitialization of unit types (can be read from file).\n\nTwo arrays of units, one for each player.\n\nTurn-based input loop for unit purchases.\n\nDynamic tracking of total money and army strength.\n\n## 🏁 Victory Conditions\n\nMoney-based or army-based win.\n\nGame ends immediately upon victory condition met.\n\n## 📦 Compilation\n\ngcc strategy_game.c -o strategy_game\n\n./strategy_game\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenniskapelles%2Fc-structs-and-games","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenniskapelles%2Fc-structs-and-games","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenniskapelles%2Fc-structs-and-games/lists"}