kingj3144 / WebSys-Assignment-2

Assignment 2 for websys
0 stars 0 forks source link

Scoreboard Display #3

Closed kingj3144 closed 10 years ago

kingj3144 commented 10 years ago

The scoreboard currently shows the score with the background of the color from that round, it should be the color the user submitted from that round. We should also display the percent error for each color value.

jedoublen commented 10 years ago

is anyone doing this? I'll do it...

kingj3144 commented 10 years ago

Go ahead Jen. It is now assigned to you.

jedoublen commented 10 years ago

Not sure why putting the string from getSliderValue() for the CSS won't work when there's a letter in it. Any ideas...

ghost commented 10 years ago

It should work, are you adding the # for the hex value to the front?

kingj3144 commented 10 years ago

The user can type in numbers into the textbox as well as letters (i,e, FF or 255). That is the only problem I can think of.

ghost commented 10 years ago

yeah currently typing the letters doesn't appear to work

jedoublen commented 10 years ago

I grabbed values from getSliderValue() instead of using color, but it doesn't show up whenever the value has a letter in it. This is for the background of the score. I have checked and it is getting the input correctly.

ghost commented 10 years ago

getSliderValue("Red") should return whatever the red slider value is, I have the current master commit running on my localhost and it alerts out correctly.

jedoublen commented 10 years ago

@ticketterminal that too. But the background color of score won't display when there is a letter for some reason.

ghost commented 10 years ago

Can you post the code you're using so we can help to debug it?

kingj3144 commented 10 years ago

you can try getSliderValue("Red").toString() Also you should use console.debug("Message"); for debugging not alerts.

jedoublen commented 10 years ago

Literally one new line and just changed the var under scoreGame():

--> var userSubColor = getSliderValue(name1)+getSliderValue(name2)+getSliderValue(name3); addScore(Math.round(score), userSubColor);

jedoublen commented 10 years ago

I think the variable, for some reason, wants to take a number and gets mad if it's not.

ghost commented 10 years ago

That's very possible, and might be why I run into issues with getting NaN debug values occasionally when scoring

jedoublen commented 10 years ago

That is actually what I see when the score tries to score a hex with letters, but the inputs are strings, so IDK.

ghost commented 10 years ago

yeah it's a Not a Number return so I guess it is expecting a number for some reason

hamlim commented 10 years ago

shouldn't the values be converted to rgb scale, ie 0-255 when the score is computed? Is it being input as the hex component instead? And if it is, we should have 6 basic variables, 3 for defining the hex codes to each red green and blue slider, and another three for the rgb scale values of the sliders.

ghost commented 10 years ago

It's scored using RGB values, as far as I'm award, but she's looking to pass the values in order to change the background color of an element accordingly, which uses the combined HEX values. The converting of the two is pretty easy, we weren't converting one of them in our original scoring method, which is what caused it to not work. We could possible send all three values through the function, in RGB decimal form, and then reconvert to change the color

jedoublen commented 10 years ago

Yes, what I'm doing is trivial and shouldn't need conversion, but for some reason... not working

jedoublen commented 10 years ago

ummm Ok. so I'm an idiot. Just realized the score won't show up because the scoring is still buggy, not because it won't take the hex input.

ghost commented 10 years ago

maybe we can meet in class ( if he gives us time ) and we can all work on the scoring bug

jedoublen commented 10 years ago

Oops sorry, accidentally clicked closed.

Yes, we should meet in/out of class.

jedoublen commented 10 years ago

Just pushed changes for this.

Commit Message: "display percentages and changed layout for scores. changed scoring to absolute values"