Giter VIP home page Giter VIP logo

zuul's People

Contributors

fredriq avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tonlethanh

zuul's Issues

What if: More keys?

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.

Timer class => wow!

I ❤️ your implementation of timer class!
It makes it much easier to overview the timing in the Game class!

String parameters

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.

Like it!

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:))

Remove constructor

You can remove constructor in CommandWords if it is not used, I think

Switch String

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 :)

More commands == much work

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.

Exit Class?

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 😄

Protokollet från kurswebben

  • Uppfyller kraven i uppgiften
  • Användarvänlighet (så användarvänligt det kan bli 😄)
  • Informativa utskrifter
  • Enkel inmatning
  • Programmerarvänlighet
  • Vettiga namn
  • Kommentarer
  • Konsekvent språk
  • Konsekvent formattering
  • Felhantering (kunde varit bättre, bla om användare skrivet mer än tillåtet)
  • Strukturering
  • Lämplig uppdelning i klasser (förutom det jag skrivit i andra issues)
  • Lämplig uppdelning av metoder
  • Temporära variabler så lokalt som möjligt
  • Återanvändbara metoder/klasser (inte Key tex, används bara en gång)
  • In- och utdata till metoder
  • Flexibelt/utbyggbart program (bla det där med Key)
  • Ingen kodupprepning
  • Ingen hårdkodning

Kodgranskning

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.