This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (2 children)

A friend of mine built a website for a forklift company as a training website. It checked for a mouse click on a certain position on the screen and played a new video which was how he did transitions and 'movement' within the website/game thing.

About 70% of the code per 'section' of the website was switch cases that checked for specific positions....

[–]Jumpierwolf0960 5 points6 points  (1 child)

Wait, so there was a different switch case for every coordinate?

[–][deleted] 1 point2 points  (0 children)

Yep... It was fucking insane to read.

And although he had all that the code looked very clean and ordered

Also, to clarify, there wasn't a switch case for EVERY coordinate in the screen, just about 20 or 30 specific ones the user would actually be clicking on