It's very good, I have been enjoying it thoroughly. I can't wait to be finished with University so I can play the game again! In 2 weeks time I be finished with a degree with Honours in Computer Science, yay! Got a job lined up as well, yay again!
Just an insight in to my life there, anyways enjoy!
You're right it would be cool, but you're also right in assuming it's been discussed before. I think I remember them talking about it on the bombcast at one point and they said that it was just too much content to manage in their databases, as well as the fact that there's already sites purely for videos which do it way better. Like youtube for example. :)
@example1013: Yeah I'm the same, when I'm learning a new language I like to have a few examples to go from to see how it differs from others.
@proggykins: I've put two ways on here as I'm sure you've seen. The second is much more elegant and will only tell them "oops" once for every time they click the button having exceeded their max attempts. The former will give them an infinite loop of "oops" which is bad code. If your lecturer wants that he's crazy and you should just submit the second one (with alerts for errors in it, sorry I commented those out).
@takua108: It was because I was just leaving that part of his code. He said he wanted a while loop which did that. I was going to reply to that and say he just wants an if at the top just below the variables like this:
if(attempts>=3){
alert("oops");
return false;
}
I wrote out the code again and was trying to find a nice way to post it on here so that the formatting wouldn't get screwed up when I moved it from Notepad++ but I can't be bothered. I'll just post it messy again.
Put the attempts outside of the function to make it a global variable.
Put an if statement at the end so it will only increment once if at any point in the code returnValue was set to False. The way it was originally they could potentially get stuck in the loop after 1 attempt to log in.
Send an alert to let the user know how many attempts have been made.
I really shouldn't just give the answers, but whatever.
Log in to comment