{"id":20354923,"url":"https://github.com/grayhatdevelopers/snakesandladdersgame","last_synced_at":"2026-05-28T20:31:31.191Z","repository":{"id":117961101,"uuid":"219446522","full_name":"grayhatdevelopers/SnakesAndLaddersGame","owner":"grayhatdevelopers","description":"Snakes and Ladders Implementation without Driver function, written in C++ with standard Data Structures","archived":false,"fork":false,"pushed_at":"2019-11-04T18:24:29.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T17:35:18.648Z","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/grayhatdevelopers.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":"2019-11-04T07:55:50.000Z","updated_at":"2020-08-24T12:19:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3ec3f9c-10fb-4b17-abc3-8e466651574f","html_url":"https://github.com/grayhatdevelopers/SnakesAndLaddersGame","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grayhatdevelopers/SnakesAndLaddersGame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2FSnakesAndLaddersGame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2FSnakesAndLaddersGame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2FSnakesAndLaddersGame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2FSnakesAndLaddersGame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grayhatdevelopers","download_url":"https://codeload.github.com/grayhatdevelopers/SnakesAndLaddersGame/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2FSnakesAndLaddersGame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33626137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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-11-14T23:10:27.584Z","updated_at":"2026-05-28T20:31:31.171Z","avatar_url":"https://github.com/grayhatdevelopers.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SnakesAndLaddersGame\nSnakes and Ladders Implementation with Driver function, written in C++ with standard Data Structures\nBy: Saad Bazaz\n\nThere's a lot to cover, so I'll keep it crisp. Can't write much at this hour anyway.\n\n\n======= fileHandler =======\n\nThe fileHandler contains a function which can read *any* map you throw at it (if it's formatted the right way... it'll throw an error \notherwise). By default, it loads \"map.txt\" from the relative folder but if you enter a file name which is available in \\User_Maps\\ \nthen it'll get it.\n\nThis is achieved by using two vectors, one as a main reference, the other as a reverser. The end result? The entire map is loaded sequentially\nto a string vector. Had the original design of the map been such it would have been easier... \"Kher\", if I had implemented custom maps I'd\nload them sequentially. Might do it someday just for fun.\n\nThe other functions serve no purpose as of yet.\n\n\n\n====== Queue ======\n\nA self implemented Queue ADT. Nothing special here.\n\n\n\n====== Stack ======\n\nTricky part here, had to create two Stack ADTs.\nRollStack (as per assignment requirements):\n  Contains push_roll() and various other functions present in the assignment Test cases. Specialised for storing integers of dice rolls.\n  \nTemplatized Stack ADT:\n  Contains generic Stack functions. I had to use it to reverse the Queue whenever a dice roll equaled to 3.\n\n\n\n====== 4DLinkedList ======\n\nAs per assignment requirements, it is a 4D linked list with Tile containing up, down, left and right pointers, and two data members \n(one for storing the number of the Tile and the other as a special, initialized with \"\" by default).\nIt has too many functions for me to explain in this text file.\n\n\n\n====== Map ======\n\nContains the Map class. Initializes Map through the string vector obtained from the fileHandler. Uses rows and columns to define the \n\"Edges\", and assigns the Ladders and Snakes with their respective up and down pointers using a combination of two vectors (for each) \n- one storing the value (which is checked whenever the function lands on a special tile), the other storing the address of the last \nfound occurence of said special value. This creates a smooth connection of each and every ladder/snake tile from beginning to end.\n\nTheoretically, this can also load custom maps with no problem. And ANY number of ladders/snakes. As long as they don't exist on the\nedge, as the up and down pointers are already occupied (I found that an issue during my work).\n\n\n\n====== SnakesAndLadders.h ======\n\nContains main two classes: Player and Game. These pretty much aid the entire driver function. Game contains RollDice(), \nTransverseBoard() etc as per assignment requirements. Also contains ThrowDice(), a random number generator.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrayhatdevelopers%2Fsnakesandladdersgame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrayhatdevelopers%2Fsnakesandladdersgame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrayhatdevelopers%2Fsnakesandladdersgame/lists"}