Comments (5)
I took a look at the code and I have an idea.
Currently coins are created and put into a list. I want to add an additional layer to this by creating a nested dictionary which uses the coin coordinates as keys and stores the coin index in the resulting nest structure (so something like `{"x coordinate"{"y coordinate" = coin index}}). Then instead of checking every coin the dictionary is referenced to check if a coin exists. If it does the coin list is accessed to update the coin's state.
If this sounds like a viable implementation I'll work on it.
from supermario.
Nice idea and seems viable you may get going with it
from supermario.
@jrkong status?
from supermario.
Currently debugging. I'm thinking that just using the x and y isn't viable because of a few issues:
- Mario's overall coordinates aren't tracked by the board, he's just identified by the board which means checking Mario's coordinates requires more checks then originally intended.
- The math required to calculate Mario's size from his seed coordinates will take roughly as much work as the current coin logic implementation.
Right now I'm testing moving the coin logic into the board update logic so it removes the coin at the updated location if Mario passes it using the coin dictionary I implemented.
from supermario.
Nice
from supermario.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supermario.