{"id":15934216,"url":"https://github.com/technicallyty/invaders","last_synced_at":"2025-04-03T15:15:30.510Z","repository":{"id":106122748,"uuid":"380116218","full_name":"technicallyty/invaders","owner":"technicallyty","description":"challenge","archived":false,"fork":false,"pushed_at":"2021-06-25T13:35:39.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T07:41:38.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/technicallyty.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":"2021-06-25T03:44:25.000Z","updated_at":"2021-06-25T13:35:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9f77809-d3d2-49da-a53f-5a1a9e3b1e82","html_url":"https://github.com/technicallyty/invaders","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"fb4e73dd481c194afcc898a775292e8bec7f8ef2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyty%2Finvaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyty%2Finvaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyty%2Finvaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyty%2Finvaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technicallyty","download_url":"https://codeload.github.com/technicallyty/invaders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247024153,"owners_count":20870940,"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":[],"created_at":"2024-10-07T03:02:16.309Z","updated_at":"2025-04-03T15:15:30.492Z","avatar_url":"https://github.com/technicallyty.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Invasion \nbuilt with Go version 1.16.5\n\n### Running the binary\n\nrun the command `make build` in project directory\n\nrun the binary with this command:\n`./main -map YOUR_FILE.txt -n 5`\n\nyou can run the sample file with:\n`./main -map map.txt -n 5`\n\n#### Flags:\n`-map (your_textFile)` - see below on how to form a well formed text input file\n\n`-n (number)` - the number of aliens to spawn on the map. Note: at most can be 2*number of cities (in the maximum case, the game ends instantly)\n\nthe program will end by printing the cities and their paths left in the game, same format as input file.\n\n### Running the tests\n`make test`\n\n### Assumptions\nThe project describes an example input file that has cities in its path not defined. I'm assuming that any city found\nin a text file will have its own line describing its own paths. Each city will have at least 1 path. There are no sinks (in the beginning at least).\n\nI assume the input file will be formed as such:\n```\nfoo north=bar south=baz\nbar south=foo\nbaz north=foo\n```\n\n### Notes\nInitially, `MoveAlien` was `MoveAliens`, which would move all aliens at the same time.\nUpon running the program, I noticed this could cause ping-pong behavior where two aliens could continuously swap positions.\nBecause of this, it only moves one alien at a time, and then checks for battle conditions\n\n`SuperEpicAlienBattle` used to loop over all cities, however this felt like a waste of resources. Instead, since the above change\nmade aliens move one at a time, I decided to simply execute a check if they moved into a city with 1 alien, and execute\na fight after moving the 2nd alien in.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicallyty%2Finvaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnicallyty%2Finvaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicallyty%2Finvaders/lists"}