{"id":18417416,"url":"https://github.com/stellar/fca00c-asteroids","last_synced_at":"2025-08-25T06:41:07.676Z","repository":{"id":65932113,"uuid":"598831902","full_name":"stellar/fca00c-asteroids","owner":"stellar","description":"Learn Soroban and compete for a top spot on the leaderboard in Fast, Cheap \u0026 Out of Control","archived":false,"fork":false,"pushed_at":"2024-07-27T06:08:41.000Z","size":75,"stargazers_count":6,"open_issues_count":1,"forks_count":9,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-04-07T12:48:26.968Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fastcheapandoutofcontrol.com","language":"Rust","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/stellar.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":"2023-02-07T22:23:37.000Z","updated_at":"2023-03-29T04:08:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbab2b9d-18b2-4d44-b4a1-f320fe2a9063","html_url":"https://github.com/stellar/fca00c-asteroids","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/stellar/fca00c-asteroids","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Ffca00c-asteroids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Ffca00c-asteroids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Ffca00c-asteroids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Ffca00c-asteroids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stellar","download_url":"https://codeload.github.com/stellar/fca00c-asteroids/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Ffca00c-asteroids/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272015406,"owners_count":24858936,"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-08-25T02:00:12.092Z","response_time":1107,"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-06T04:09:24.087Z","updated_at":"2025-08-25T06:41:07.649Z","avatar_url":"https://github.com/stellar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asteroids \u003c!-- omit in toc --\u003e\n\nToday's game will set you on a spaceship in one of the darkest corners of the\nuniverse! It is your quest to explore this uncharted portion of the universe and\ndestroy 100 asteroids. Don't forget to re-fuel and upgrade your ship along the\nway.\n\n## TL;DR\n\nProvided here are the bullet points of what you will **absolutely need** to know\nto successfully play this game. This is _intentionally_ quite brief, and\neverything is explained in much greater detail further on down in this document.\n\n- Your goal is to earn `100 points` by shooting and destroying asteroids\n- You will need to navigate your ship through multiple `16x16` galaxy grids\n  - `6 asteroids` are contained within each galaxy\n  - `2 fuel pods` are contained within each galaxy\n- Use the `p_turn`, `p_move`, `p_shoot`, `p_harvest`, and `p_upgrade` functions\n  to control your ship\n- Turning, moving, and shooting all consume different amounts of fuel\n- Upgrade your ship to improve fuel efficiency\n- Upgrading consumes points\n\n## Table of Contents \u003c!-- omit in toc --\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand Table of Contents\u003c/summary\u003e\n\n- [TL;DR](#tldr)\n- [Competition Leaderboards and Schedule](#competition-leaderboards-and-schedule)\n- [Get Started with Soroban](#get-started-with-soroban)\n- [How to Play](#how-to-play)\n  - [Gather Your Materials](#gather-your-materials)\n  - [The Game Engine Contract](#the-game-engine-contract)\n  - [The Map](#the-map)\n  - [Controlling Your Ship](#controlling-your-ship)\n  - [Compile Your Contract](#compile-your-contract)\n  - [Submit Your Ship](#submit-your-ship)\n- [Useful Information](#useful-information)\n  - [`GameEngine` Initialization Parameters](#gameengine-initialization-parameters)\n  - [Diagonal Turns and Moves](#diagonal-turns-and-moves)\n  - [Helpful Game Engine Methods](#helpful-game-engine-methods)\n  - [Testing Your Contract](#testing-your-contract)\n- [Suggestions and Strategies](#suggestions-and-strategies)\n\n\u003c/details\u003e\n\n## Competition Leaderboards and Schedule\n\n_Fast, Cheap, and 0ut 0f Control_ is a wild[,][,] experimental take on coding\ncompetitions. Your goal is to submit a working contract that solves a given\nproblem, or performs a given task. We will track results in the following three\n(3) leaderboards.\n\n- **Fastest Submission**: On this leaderboard, the top prizes go to the entrants\n  submitting a complete contract first, second, and so on. A good, old-fashioned\n  race!\n- **Smallest WASM**: We want to test the limits of how small these deployed\n  contracts can be. We're awarding prizes for valid contracts with the very\n  smallest compiled sizes.\n- **Lowest Resource Use**: We are measuring resource use as the number of CPU\n  instructions used during a contract's invocation. Top spots are given to\n  complete contracts with the least CPU utilization.\n\nEach time you submit a contract, it will be judged according to all leaderboards\ncurrently accepting entries. Your position in each leaderboard is determined by\nyour **best** submission to _that particular_ leaderboard.\n\n- **Yes!** You _can_ submit more than once. You probably should, if you want to\n  be competitive within each leaderboard.\n- **Yes!** You _can_ earn a prize from each leaderboard. Specific award amounts\n  can be found in the [official fca00c rules][rules].\n\nThis round of fca00c will run according to the following schedule:\n\n| Date       | Time (EST) | Unix Timestamp | What's Happening?                                                                    |\n| ---------- | ---------- | -------------- | ------------------------------------------------------------------------------------ |\n| 2023-02-15 | 7:00pm     | 1676505600     | fca00c-asteroids goes live! All leaderboards are open for entries.                   |\n| 2023-02-22 | 7:00pm     | 1677110400     | Submission deadline for _Smallest WASM_ leaderboard.                                 |\n| 2023-03-01 | 7:00pm     | 1677715200     | Submission deadline for _Fastest Submission_ and _Lowest Resource Use_ leaderboards. |\n\n## Get Started with Soroban\n\nAs a _very brief_ precursor before we get too deep into the weeds, here is a\nquick cheatsheet of references, links, and resources you might find useful if\nyou are confused by the words _Soroban_, _Stellar_, _Rust_, or anything else we\ndiscuss.\n\n- [Soroban Documentation][soroban-docs]: This is a great first step to learn\n  more about Stellar's smart contract platform.\n- [Soroban SDK Crate][soroban-sdk-crate]: The official Rust SDK for interacting\n  with the Soroban platform.\n- [The Rust Book][rust-book]: The definitive volume for learning the Rust\n  programming language.\n- [Rustlings][rustlings]: A more interactive method for learning Rust.\n- [Soroban Quest][series-5]: Soroban Quest is an interactive course all about\n  Soroban.\n  - ⚠️ Due to Soroban's current alpha nature, this course may or may not be\n    fully up-to-date, but it will provide some valuable context.\n- [Stellar Quest][sq-learn]: Soroban lives on top of the Stellar network.\n  Writing smart contracts for Soroban doesn't _require_ an in-depth knowledge of\n  Stellar, but the context can be useful.\n\n[soroban-docs]: https://soroban.stellar.org/docs\n[soroban-sdk-crate]: https://docs.rs/soroban-sdk\n[rust-book]: https://doc.rust-lang.org/book/\n[rustlings]: https://github.com/rust-lang/rustlings\n[series-5]: https://quest.stellar.org/soroban\n[sq-learn]: https://quest.stellar.org/learn\n\n## How to Play\n\n### Gather Your Materials\n\nBefore you can begin writing your contract, you'll need some materials first.\n\n1. [Setup your Soroban development environment][soroban-setup] using this guide\n   from the Soroban documentation.\n2. Git clone the [`stellar/fca00c-asteroids` repo][repo]. This is the\n   _canonical_ source for information and materials used for this challenge.\n\nIf you are reading this document anywhere besides the [fca00c site][site] (in a\ncode editor, for example), you've probably already done everything above, so you\nget to skip right to the front of the line. Well done!\n\n\u003e **Note:** The competition materials may be updated, changed, etc. from time to\n\u003e time. If you've cloned the git repository, we recommend you `git pull` often.\n\u003e If something seems to be broken, not working as expected, etc. checking for an\n\u003e up-to-date repo is an excellent first step.\n\n### The Game Engine Contract\n\nWe have built a _Game Engine_ contract. Your task is to write a contract that\nwill interact with our game engine in the Soroban environment. This contract has\nbeen included in two formats:\n\n1. In the `contracts/_game-engine` directory, we've provided the source code for\n   the contract, broken into its various modules. This version of the contract\n   is **NOT** intended to be modified, or used in your contract. It's being\n   provided only as a resource and reference to aid in understanding and\n   problem-solving.\n2. As a compiled WASM binary: `contracts/game_engine.wasm`. This is the version\n   of the contract you'll want to build and test your solution with. The starter\n   tests we've provided in the `solution` directory will mimic our evaluation\n   environment as closely as possible.\n\nIf you want to investigate the compiled binary, the `soroban contract bindings`\ncommand will give you a pretty decent understanding. `soroban contract bindings`\nis intended to generate client bindings for a contract. This will give you great\ninsight into what functions exist in a given WASM file, and what arguments they\nare expecting. You can run the command like this:\n\n```bash\nsoroban contract bindings --wasm /path/to/game_engine.wasm --output rust\n```\n\n### The Map\n\nThe map in our asteroids game is an infinite cartesian plane (yes, this universe\nis \"flat,\" don't worry about it. You should be focusing on the game, anyway).\nThis plane is then divided into \"galaxies.\" Each galaxy is a `16x16` square.\nNote the difference between `16 squares` and `17 points` along either the `x` or\n`y` axis that makes up each galaxy. For example, your ship starts its journey in\nthe galaxy that has a center coordinate of `(8, 8)`, and it is comprised of all\npoints within the following coordinates:\n\n```text\nBottomLeft: (0, 0)\nBottomRight: (16, 0)\nTopRight: (16, 16)\nTopLeft: (0, 16)\n```\n\nEach galaxy will contain `6 asteroids` and `2 fuel pods`. You can only see or\nshoot asteroids that are inside your current galaxy. When the time comes to\nchange galaxies, you must move your ship outside the boundaries of your current\ngalaxy.\n\n\u003e **Note:** It would be more technically correct to say, \"Each galaxy will\n\u003e _usually_ contain `6 asteroids` and `2 fuel pods`.\" It is unlikely, but\n\u003e _possible_ that our game engine contract will generate a set of colliding\n\u003e coordinates for two elements (asteroids or fuel pods). In this improbable\n\u003e circumstance, a fuel pod will take priority over an asteroid, and there will\n\u003e be only one element left at this point (\"erasing\" the previous element). A\n\u003e galaxy like this would contain fewer than 8 map elements.\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand Map Visualizations\u003c/summary\u003e\n\nBelow, a single galaxy is illustrated. After the game engine has been first\ninitialized, your ship is placed at `(8, 8)` within the first galaxy.\n\n![A single galaxy in the asteroids game][single-galaxy]\n\nEven though you can only _see_ one galaxy at a time, there are neighboring\ngalaxies that contain their own asteroids and fuel pods. These are only\naccessible to you once your ship has entered that next galaxy.\n\n![Multiple galaxies in the asteroids game][multi-galaxy]\n\n\u003c/details\u003e\n\n### Controlling Your Ship\n\nYour vessel is outfitted with the most _bleeding-edge_ capabilities we could\ncram into a starship! Your ship is capable of performing all these actions:\n\n- **Turn**: Your ship can turn in any direction you choose. Turning does cost\n  fuel, though. It will cost you the same amount of fuel, no matter which\n  direction you are turning to.\n  - Use the game engine's `p_turn()` method to turn your ship in the desired\n    direction before you shoot or move. Each turn will cost `1 fuel`, no matter\n    how far you are turning (i.e., turning 45° costs the same as turning 180°).\n  - You must supply a `Direction` argument to the `p_turn()` method, specifying\n    the new direction you'd like your ship to face:\n    `engine.p_turn(\u0026Direction::Left)`.\n  - Remember, calling the `p_turn()` method consumes a flat cost of `1 fuel`,\n    even if you turn 315°.\n  - Read below for more details on [diagonal turns][diagon-alley].\n- **Move**: Your ship can move any number of spaces as long as you have enough\n  fuel to cover that cost. Each space you move costs fuel as well (twice as much\n  fuel as each turn, mind you).\n  - Use the game engine's `p_move()` method to move your ship. By default, your\n    ship will move `1 space` in the direction it is facing.\n  - You can (optionally) provide a number of spaces you'd like your ship to\n    move: `engine.p_move(Some(4))`.\n  - Remember that moving will cost `2 fuel` for every _space_ moved, no matter\n    how many times `p_move()` is called, or how many spaces you provide to it as\n    an argument. The calculation is **always** made on the number of spaces your\n    ship moves.\n- **Shoot Asteroids**: Your ship is capable of shooting asteroids to destroy\n  them and earn valuable points! For each asteroid destroyed, you will be\n  rewarded with `1 point`. Your ship's laser cannon has a range of `3 spaces`.\n  For example, if your ship is currently located at `(53, 72)`, you could shoot\n  and destroy asteroids located at `(53, 75)` or `(50, 75)`; however, an\n  asteroid located at `(49, 72)` would be out of range.\n  - Use the game engine's `p_shoot()` method to shoot your laser cannon in the\n    direction your ship is currently facing. Each time you fire the cannon will\n    cost `5 fuel`, whether you hit an asteroid or not.\n  - If your ship is facing in a diagonal direction, you can shoot asteroids\n    within range of that direction. This can save you fuel and execution costs\n    by minimizing the number of moves needed to get within range of an asteroid.\n  - You _can_ shoot asteroids sharing the same coordinates as your ship (i.e.,\n    an asteroid you're \"on top of\").\n  - You _can_ shoot multiple asteroids in one shot in the same direction,\n    provided they are all within range of your ship (i.e., you shoot in a\n    straight line, and any asteroids on that line will be destroyed).\n- **Harvest Fuel Pods**: The amount of fuel you begin with will not be enough to\n  complete this quest. Sorry! Fuel prices are quite high at the moment. So,\n  along the way, you will need to harvest fuel pods to recharge your ship.\n  - Use the game engine's `p_harvest()` method to harvest a fuel pod once you\n    have moved your ship to the fuel pod's coordinates. Each fuel pod harvested\n    will give your ship an additional `100 fuel`.\n- **Upgrade**: Your ship even comes with its own upgrade feature. You can\n  upgrade your ship **only once**, and you can do so at any point during your\n  quest (only you can determine when the time is right). You will have to give\n  up some of the points you've worked hard to earn, but after the upgrade is\n  complete your ship will use half the fuel for _turning_, _moving_, and\n  _shoooting_.\n  - Use the game engine's `p_upgrade()` method to upgrade your ship at any point\n    during your quest. Upgrading will cost `5 points`.\n\n### Compile Your Contract\n\nWhen you've written a working contract, you'll need to build a binary file that\nwill contain your contract's WASM byte-code. This executable file is what you\nare meant to submit as \"Your Ship\" on the [fca00c site][site].\n\nCompilation can be done many different ways, but we've provided a couple\ncommands in our `Makefile` to get you going. `make build` will produce a binary\ncompiled according to the \"release\" profile, while `make build-optimized` will\nwork to optimize that build and minimize the size of the `.wasm` file.\n\nYou can also choose from several different optimization strategies to produce an\nefficient contract binary. There is much more nuance here than we have space to\nget into fully. However, you can use the following links to get started learning\nmore.\n\n- [Optimizing Builds][soroban-optimizing]: This example shows how to use the\n  `soroban-cli` to optimize a compiled contract using some sensible defaults.\n- [The `wasm_opt` crate][wasm-opt-crate]: This can be used to further customize\n  and optimize your compiled contract.\n- [The `Binaryen` toolkit][binaryen]: Binaryen is a compiler and toolchain for\n  WebAssembly. This toolkit is used \"under the hood\" in the `wasm_opt` crate.\n\n[soroban-optimizing]:\n    https://soroban.stellar.org/docs/getting-started/hello-world#optimizing-builds\n[wasm-opt-crate]: https://docs.rs/wasm-opt/latest/wasm_opt/\n[binaryen]: https://github.com/WebAssembly/binaryen\n\n### Submit Your Ship\n\nYou're finished! Really!? Sweet!! You should be proud of yourself, just for\ngetting to this part!\n\nWhen you're ready to have your smart contract evaluated, your next step is to\n[upload your compiled WASM file on the fca00c site][upload-contract]. You'll\nhave the option to log in and select how your name will be displayed if you land\non the leaderboard, and you can choose the file you wish to upload. We'll take\ncare of everything else from there!\n\n\u003e **Note:** The Soroban environment we run in our backend will limit your\n\u003e contract invocation to 30 seconds of runtime, and `16_000_000_000` CPU cycles.\n\u003e If your contract runs past these limits, your validation will fail.\n\n## Useful Information\n\n### `GameEngine` Initialization Parameters\n\nWhen we are testing your solution contract, we will run it against our game\nengine with a prescribed and consistent set of initialization values. These have\nbeen documented in the `test.rs` file, but we'll include our initialization\nvalues and some brief descriptions here, as well:\n\n- `move_step (1)`: The number of spaces your ship will `p_move()` by default\n- `laser_range (3)`: The maximum distance from which your ship's laser can\n  `p_shoot()` an asteroid\n- `seed (8891)`: The map's randomness is seeded with a known, consistent `u64`\n  value (this ensures everyone is playing on the same map)\n- `view_range (16)`: The size of each galaxy grid\n- `fuel: ()`: Soroban functions can only accept a maximum of 10 parameters, so\n  all the fuel parameters are collected here\n  - `player_fuel (50)`: The amount of fuel your ship contains at initialization\n  - `shoot_fuel (5)`: The amount of fuel consumed by the `p_shoot()` method\n  - `move_fuel (2)`: The amount of fuel consumed when you `p_move()` a single\n    space\n  - `turn_fuel (1)`: The amount of fuel consumed by the `p_turn()` method\n- `asteroid_reward (1)`: The number of points you are rewarded for destroying an\n  asteroid\n- `asteroid_density (6)`: The number of asteroids each galaxy will contain\n- `pod_density (2)`: The number of fuel pods each galaxy will contain\n\n### Diagonal Turns and Moves\n\nIf you take a look at the game engine's type definitions, you may notice the\n`Direction` type looks like this:\n\n```rust\npub enum Direction {\n    Up,\n    UpRight,\n    Right,\n    DownRight,\n    Down,\n    DownLeft,\n    Left,\n    UpLeft,\n}\n```\n\nFrom the presence of directions like `UpRight` and `DownLeft`, you could infer\n(correctly) that your ship is capable of turning and moving diagonally. You can\nboost your ship's efficiency by moving diagonally when that is called for.\n\nFor everyone's sake, we've simplified the calculations in the game contract. 1\nunit of diagonal movement is the same as 1 unit of horizontal or vertical\nmovement (We know, things can get weird out there in space).\n\nFor example, if your ship is currently pointing `Up` at `(0, 0)`, and you want\nto move your ship to `(3, 2)`, here's how this can help:\n\n```text\n# Fuel Use Without Diagonal Moves\np_move(2) + p_turn(Right) + p_move(3) = 4 + 1 + 6 = 11 fuel\n\n# Fuel Use With Diagonal Moves\np_turn(UpRight) + p_move(2) + p_turn(Right) + p_move(1) = 1 + 4 + 1 + 2 = 8 fuel\n```\n\nYou can also shoot asteroids in diagonal directions, as long as your ship is\nfacing that direction and they are within range. This is a very powerful\nfuel-saving technique!\n\n### Helpful Game Engine Methods\n\nThe game engine contract provides some helper methods so you can orient yourself\nin space and monitor the other vital information about your ship:\n\n- `p_pos()`: Returns the ship's position on the map, as a set of coordinates.\n- `p_dir()`: Returns the direction your ship is currently pointed in.\n- `p_fuel()`: Returns the ship's current fuel level.\n- `p_points()`: Returns the player's current score.\n- `get_map()`: Returns the current galaxy's map as `Map\u003cPoint, MapElement\u003e`,\n  where `MapElement` will be either an asteroid or fuel pod.\n\n### Testing Your Contract\n\nWhile writing your contract, you'll likely want to incorporate some tests along\nthe way. The `src/test.rs` file is there for that. We've included two test\nfunctions to get you started.\n\n- The `fca00c_fast()` test will test against your written contract source code,\n  and is a much quicker way to iterate throughout the build process.\n- The `fca00c_budget()` test will test against a _compiled_ WASM contract\n  binary. Of course, for this to work, you will need a compiled contract in\n  place first. You can run `make build` or `make build-optimized` (or, you can\n  do it yourself with `cargo build`, provided you know how to use it).\n\nYou'll want to keep our original `fca00c_fast()` and `fca00c_budget()` functions\nintact, but you can most definitely write your own. In fact, many people may\nfind it _easier_ to write their initial solution inside a `test.rs` file before\nbuilding the final compiled WASM binary.\n\nInside the testing environment, you can access very useful things from the `std`\ncrate, such as the `println!` macro. If you want to output any data along your\ndevelopment road, it's likely that including it in a test will be the quickest\nand easiest way to go about it.\n\n\u003e **Note:** Rust tests do not print by default. So, if you're using `println`,\n\u003e you will need to run the test like: `cargo test -- --nocapture`. This will\n\u003e send any test output to stdout.\n\nThen, after you've written a working solution, it's pretty easy to get it moved\ninto your `lib.rs` file. If you want to get some kind of output from your\n`lib.rs` file, you'll need to learn all about [logging][logging] and\n[debugging][debugging] in Soroban. There is a lot there, but it's useful\nknowledge that can help you get the information you need, right from where you\nneed it.\n\n## Suggestions and Strategies\n\nThere is absolutely no shortage of interesting and unique methods you could use\nto solve this problem. _Fast, Cheap, and 0ut 0f Control_ is designed to allow\nfor many various competitive strategies. When trying to compete for pure speed\nand get the contract written before others, you'll likely care far less about\noptimizing your contract's performance or execution cost. Similarly, when you're\naiming for the very cheapest execution cost, the final deployed contract size\n_may_ not be a primary concern of yours. Your chosen strategy will need to\nreflect the relevant competition leaderboard you're currently optimizing for.\n\nTo get you started, we are providing below some suggestions and possible\nstrategies you might consider using. Take them, leave them, adapt them based on\nyour competitive context: The choice is yours.\n\n- This game's universe is infinite! It might be _possible_ to move in one single\n  direction, blasting any asteroids that happen to be right in front of you, and\n  come out victorious. That's very unlikely to work out in a cost- or\n  time-efficient manner, but you're welcome to give it a shot.\n- The `get_map()` function does quite a bit of calculating, and even accesses a\n  few different contract storage entries. Perhaps (or, perhaps not...) it would\n  be more efficient to keep track of what is in your galaxy's map on your own,\n  rather than calling `get_map()` repeatedly for the same galaxy.\n- Perhaps more important than anything else in this game is to think through\n  carefully how you will approach navigating. How far in advance do you want to\n  know the layout of your galaxy (or multiple galaxies)? Which asteroid is the\n  best next target? How low is too low for your fuel before you start looking\n  for a refill? All these questions can only be answered by you, and your\n  answers will determine your level of success in this game.\n- Before navigating to harvest a fuel pod, you might want to shoot any nearby\n  asteroids first, or shoot any you pass along the way (provided you have enough\n  fuel, that is).\n- Once you've harvested all fuel pods and destroyed all the asteroids in a\n  galaxy, it is time to move on to the next one! However, _which_ galaxy to move\n  to is certainly not a trivial choice. Plan carefully how you want to navigate,\n  considering which neighboring galaxy provides the closest, cheapest, and/or\n  fastest path of entry.\n- When you set out for a fuel pod, make sure you're heading toward the _nearest_\n  one to your current location.\n\n[,]: https://en.wikipedia.org/wiki/Fast,_Cheap_%26_Out_of_Control\n[soroban-setup]: https://soroban.stellar.org/docs/getting-started/setup\n[repo]: http://www.github.com/stellar/fca00c-asteroids\n[site]: https://fastcheapandoutofcontrol.com\n[diagon-alley]: #diagonal-turns-and-moves\n[logging]:\n    https://soroban.stellar.org/docs/how-to-guides/logging#using-the-log-macro\n[debugging]: https://soroban.stellar.org/docs/learn/debugging\n[single-galaxy]:\n    https://user-images.githubusercontent.com/2024293/217354050-405451d6-e5c5-48a4-abc4-5cc2abe5b9a3.png\n[multi-galaxy]:\n    https://user-images.githubusercontent.com/4383610/217380430-b00376fa-624f-4f9e-81ec-2fff88e63e37.png\n[upload-contract]: https://fastcheapandoutofcontrol.com/game/asteroids/submit\n[rules]: https://fastcheapandoutofcontrol.com/rules\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Ffca00c-asteroids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstellar%2Ffca00c-asteroids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Ffca00c-asteroids/lists"}