fredriq / zuul Goto Github PK
View Code? Open in Web Editor NEWCustom version of the World of Zuul game.
Custom version of the World of Zuul game.
What if you want to create more keys and put in different rooms for different doors? One solution would be to send a Key object to the Room constructor (instead of the boolean argument) if the room should be locked (with that key) and then check if user has the key when the user tries to enter the room. That would make it easier to scale the game up if wanted 😃
The same for the beamer, atm you can just have one beamer (and in fact, who wants two?). But it's good practice.
I ❤️ your implementation of timer class!
It makes it much easier to overview the timing in the Game class!
Sometimes you send information about, for example, exits with code like:
lab.setExit("east", office, "locked");
I don't think saving "states", like "locked" in this case, as Strings is a good idea. It feels bad in some way. You have to build your code around it, and if you one day wants to change "locked" for maybe "closed", you need to rewrite a lot of the code. You could use enums maybe, or some other type of way to differentiate the information.
You can remove the else clause in quit method in Game class, and just return true.
Overall, I like your zuul stylish game! The code is easy to understand, it is compact. If the code is well-written, one don't care about the contents of the game 🎲
For me it was easy to understand what everything was doing, creds to you! 🌟
(And btw, my issues are just ideas, it works fine as it is and if you don't want to scale it up like a MineCraft boom you'll be fine to let it be as it is:))
You can remove constructor in CommandWords if it is not used, I think
Cool! I was going to say nahnahnah. I thought one couldn't switch Strings, and when I looked it up i noticed it is a new feature in Java 7. Jippie!!! 🌠 Thanks for showing me :)
If you want to add a command, you have to change in a lot of places in the code. You could simplify this for example by using Enums.
Why don't have an Exit class and let the objects of it store more information about them, like connected Rooms and the information String? Instead of having two HashMaps in Room class... It's easier to add more information later if needed.
Ok, I had done the same due to my laziness, but however 😄
Hej Fredrik!
Jag tänkte granska din kod för inda13-spelet, undrar bara när du tänkte lägga upp den?
MVH Jonas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.