{"id":17054374,"url":"https://github.com/uduse/goldseeker","last_synced_at":"2025-10-08T20:27:06.813Z","repository":{"id":26965141,"uuid":"30428435","full_name":"uduse/GoldSeeker","owner":"uduse","description":"A Game Interface for CS Club Competition","archived":false,"fork":false,"pushed_at":"2015-02-10T19:14:38.000Z","size":860,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T20:27:06.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/uduse.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}},"created_at":"2015-02-06T19:11:19.000Z","updated_at":"2015-11-08T23:12:03.000Z","dependencies_parsed_at":"2022-08-24T15:04:03.015Z","dependency_job_id":null,"html_url":"https://github.com/uduse/GoldSeeker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uduse/GoldSeeker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uduse%2FGoldSeeker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uduse%2FGoldSeeker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uduse%2FGoldSeeker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uduse%2FGoldSeeker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uduse","download_url":"https://codeload.github.com/uduse/GoldSeeker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uduse%2FGoldSeeker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000654,"owners_count":26082817,"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-10-08T02:00:06.501Z","response_time":56,"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":[],"created_at":"2024-10-14T10:14:41.237Z","updated_at":"2025-10-08T20:27:06.781Z","avatar_url":"https://github.com/uduse.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoldSeeker\nAn Interface for CS Club Competition\n\n\u003cbr\u003e\n\n##Table of Contents\n\n\u003cbr\u003e\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [About](#about)\n  - [Date](#date)\n  - [Author](#author)\n  - [Contact](#contact)\n  - [Description](#description)\n- [Details](#details)\n  - [Storyline](#storyline)\n  - [Your Equipment](#your-equipment)\n  - [Your Moves](#your-moves)\n  - [Display](#display)\n  - [Scoring](#scoring)\n- [Things I learned from this project](#things-i-learned-from-this-project)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n\u003cbr\u003e\n\n##About\n\n###Date \n1/29/15 ~ 2/7/15 (~40 hours)\n\n###Author\nUduse\n###Contact\nwzy950618@gmail.com\n\n###Description\nA program made as an interface for a competition of CS Club at UC Davis.\nCompetitors will write a short algorithm in 2~3 hours, controlling the\ncharactor to collect as many golds as possible in a randomly generated\ncave with limited oxygen.\n\n\u003cbr\u003e\n\n##Details\n###Storyline\nYou are an enthusiastic gold seeker and you want to make a fortune by collecting golds left in a cave by ancient pirates.\n\nYou just found the entrance of the cave, and you know you can't stay in the cave forever to find all golds because oxygen in the cave is limited and you want to get out the cave alive.\nTherefore, you decide to develop an efficient way to explore the cave as much as possible and collect as many golds as possible before the cave run out of oxygen.\n\n\u003cbr\u003e\n\n###Your Equipment\n\n####Backpack\nWhat you use to store the golds you found.\n\n####Sketch Pad\nYou are also a skilled artist with perfect space perception.\n\nDuring your exploration, you will mark all places you visited and all walls you encountered on your Sketch Pad.\n\nYou may take a look at your Sketch Pad to remind yourself about the details of the cave.\n\n\n####Ball of Thread\nYou learned from the story about Theseus and the Minotaur, so you brought with you a Ball of Thread.\n\nYou can place it at your current location, and when you retrieve it, it will bring you back given steps, or all the way back to where you placed it.\n\nSince you're smart enough, you always rewind useless thread to prevent loops whenever you step back to somewhere you have placed thread on.\n\nFor example, if you place your thread and then take a path like 0 -\u003e 1 -\u003e 2 -\u003e 3 -\u003e 4 -\u003e 2, you will prevent the loop 2 -\u003e 3 \u003e 4 -\u003e 2  and leave thread only on 0 -\u003e 1 -\u003e 2.\n\nYou always take notes for how much thread you used.\n\nIn addition, since you're good at math, you always converse the amount of used thread based on oxygen. Retrieving one unit of thread would not cost oxygen, but you're moving back with the thread, and for each step it takes one oxygen.\n\n\u003cbr\u003e\n\n###Your Moves\n\n####Look\nYou look in a certain direction and make a mark on your Sketch Pad if you see a wall.\n\u003cbr\u003e\n\n\tbool lookLeft();\n\tbool lookRight();\n\tbool lookUp();\n\tbool lookDown();\n\nreturn true when there's no wall in that direction.\n\n\u003cbr\u003e\n\n\tbool lookAround();\n\nreturn true if there's no wall in any direction.\n\n\u003cbr\u003e\n\n####Move\n \nYou walk towards a certain direction for one step. \n\nSince it requires movement, the total oxygen in the cave would decrease by 1 unit.\n\t\n\tbool moveLeft();\n\tbool moveRight();\n\tbool moveUp();\n\tbool moveDown();\n\nreturn false when you can't make that move because there's a wall\n\n\u003cbr\u003e\n\n####Marked\nYou look at your Sketch Pad, and check if a certain place next to you has been visited.\n\n\tbool markedLeft();\n\tbool markedRight();\n\tbool markedUp();\n\tbool markedDown();\n\nreturn true if the place next to you in a certain direction has been visited by you.\n\n\u003cbr\u003e\n\n####Breathe\nYou take a breathe and detect the richness of oxygen in the air with your well-trained lungs.\n\n\tint breathe();\n\nreturn the amount of oxygen available in the cave.\n\n\u003cbr\u003e\n\n####Backpack\nYou open your backpack and see how many golds you have collected. \n\n\tint backpack();\n\nreturn amount of gold you collected.\n\n\u003cbr\u003e\n\n####Sketch Pad\nYou look at your Sketch Pad closely, with all details in eyes.\n\n\tvoid sketchPad();\n\nprint the map you created for the cave\n\n\u003cbr\u003e\n\n####Ball of Thread\nPlace the thread at where you are.\n\t\n\tbool placeThread();\n\nreturn false if the ball of thread is in use.\n\n\u003cbr\u003e\n\n\nThe thread brings you all the way back to where you placed it, then you pick up the thread. \n\n\tbool retrieveThread();\n\nreturn false when the ball is still in your hand\n\n\u003cbr\u003e\n\nThe thread brings you back certain steps, you won't pick up the thread in this case.\n\n\tbool retrieveThread( int steps );\n\nreturn false when the ball is still in your hand.\n\t\n\u003cbr\u003e\n\nCheck your notes and see how much thread you have used so far. One unit of thread would take one unit of oxygen to retrieve.\n\n\tint threadUsed();\n\nreturn amount thread used\n\n\u003cbr\u003e\n\n####Leave\nYou leave the cave through the entrance with all your golds in your backpack, alive.\n\t\n\tbool leave();\n\nreturn false when you are not next to the entrance\n\n\u003cbr\u003e\n\n###Display\n\n####Sketch Pad - Icons\n#####`\u0026` You\n#####`@` Entrance\n#####`·` Places you visited\n#####`*` Places have your thread on\n#####`0` Places you collected a gold\n#####`X` Walls you have discovered\n\n\u003cbr\u003e\n\n####Sketch Pad - Examples\n(Aedi's implementation of exploration algorithm is used)\n\nYou start exploring.\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Sketch%20Pad%20Examples%20(2).png)\n\nYou keep exploring.\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Sketch%20Pad%20Examples%20(3).png)\n\nYou are almost done with exploring.\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Sketch%20Pad%20Examples%20(4).png)\n\nYou finished exploring because you think there isn't enough oxygen left in the cave and you'd better get out ASAP. \n\nYou then trace back with thread you left on ground. You are so glad that you brought the ball of thread with you.\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Sketch%20Pad%20Examples%20(5).png)\n\nStill retrieving. You are feeling bad because there's only a little oxygen in the cave.\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Sketch%20Pad%20Examples%20(1).png)\n\nYou finally get to the entrance and leave the cave! \nYou believe there's still unknown area in the cave, but you are more glad that you left the cave, ALIVE. \n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Sketch%20Pad%20Examples%20(6).png)\n\n\u003cbr\u003e\n\n####Private View - Icons\nThe real shape or a Cave, not accessible in competitor's implementation )  \n#####`\u0026` Player\n#####`@` Entrance\n#####`0` Golds\n#####`+ / \\  \u003c \u003e ^ V = H` Walls\n\n\n\u003cbr\u003e\n\n####Private View - Examples\n\nCaves are created based on two properties, **Size**, and **Complexity**.\n\n#####Medium - Simple\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Cave_Examples%20(2).png)\n\n#####Medium - Fair\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Cave_Examples%20(3).png)\n\n#####Large - Fair\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Cave_Examples%20(4).png)\n\n#####Extra Large - Fair\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Cave_Examples%20(5).png)\n\n#####Extra Large - Extra Complex\n![](https://raw.githubusercontent.com/Uduse/GoldSeeker/master/img/Cave_Examples%20(1).png)\n\n\u003cbr\u003e\n\n###Scoring\nThough you're a zealous gold seeker, you do understand the importance of life:\n\n**If you died:**\n\n**Score = 0**\n\n**If you left the cave alive:**\n\n**Score = percent of golds collected + bonus.**\n\nBonus is rewarded for extra oxygen left in the cave. You know, staying in a low-oxygen environment for too long is bad for health. \n\n\u003cbr\u003e\n\n##Things I learned from this project##\n1. **Learned how to use github to do version control.** Can't believe I started this late!\n2. **Discovered a way to generate a random map.** I accomplished this by having a brush with thickness moving randomly on a canvas and making marks on it, and places not marked will be walls (not visitable).\n2. **A better understanding of Public v.s Private.** That difference did not really matter for projects I have done before this, since I don't really need to hide things from myself, it's just a better \"Style\" or it's a \"Convention\" to hide things as private. However, this time, since I am making this interface for a competition, I really need to limit things competitors can access, otherwise it's really easy to cheat.\n3. **A better utilization of tools that help me code faster.** Especially \"Extract Method,\" \"Create Method,\" and \"Introduce Viable\" functions provided by a Visual Studio extension \"Visual Assist,\" and \"Simultaneous edit in more than one location in the editor\" by \"MultiEditing.\" They helped me a lot in saving my time from doing repetitive and dirty work, so I was able to finish the first working prototype of the project in 15 hours.\n4. **Learned how to get colored output in command window.** Learned how to used \"Window.h\" to make my output colorful in windows and ASCII Escape Codes in Linux, and this made my testing much easier (things are easier to differentiate).\n5. **A better understanding of a list and its iterator.** The Ball of thread was implemented as a linked list, and I learned from hours of debugging \"Loop Prevention\" mechanism of it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuduse%2Fgoldseeker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuduse%2Fgoldseeker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuduse%2Fgoldseeker/lists"}