Magic Forums

Forums -> Fortune Telling -> Re: Mora, Just a lie ?
You are not currenly logged in. Please log in or register with us and you will be able to comment on this or any other article on the website.
Original Post:
by: amirmd76 on Jan 20, 2016

Hi. You know Mora ? It's the fortune teller of SoM.

I'm a programmer and today I was busy doing nothing and suddenly I was curious about how Mora works. So, I took a look at its source code, and you know what I found ? this:


function MorasAnswer() {
objPage=document.getElementById('morasays1');
objPage.style.visibility = 'hidden';
objPage=document.getElementById('morasays2');
objPage.style.visibility = 'hidden';
objPage=document.getElementById('morasays3');
objPage.style.visibility = 'hidden';
objPage=document.getElementById('morasays4');
objPage.style.visibility = 'hidden';
num=(Math.round(Math.random()*4)+1);
if (num>4) num=1;
objPage=document.getElementById('morasays'+num);
objPage.style.visibility = 'visible';
}


ANd you know what does this mean ? It means it uses Math.random() (JavaScript random number) to tell your fortune.

So, is it right to tell people's fortune by using random number ? Or it's just a lie ?