marclundgren
11/23/2013 - 12:22 AM

3 gods, true, false, random

3 gods, true, false, random

/*
Three gods A, B, and C are called, in no particular order, True, False, and Random. 


True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. 

The gods understand English, but will answer all questions in their own language, in which the words for yes and no are da and ja, in some order. You do not know which word means which.
*/

(function() {

	function randomBool () {
		return !! Math.round(Math.random() * 1);
	}

	var GODS = {
		TRUE: true,
		FALSE: false,
		RANDOM: randomBool()
	};
		
	/* Determines the identities of A, B, and C by asking three yes-no questions
		each question must be put to exactly one god
	*/
	function determineWhoisWHo() {
		/* The gods understand English,
			but will answer all questions in their own language,
				in which the words for yes and no are da and ja, in some order.
					(You do not know which word means which...)
		*/
	}
})();