For AI and campaign script related discussions and questions
aubergine
Professional
Posts: 3462 Joined: 10 Oct 2010, 00:58
Post
by aubergine » 08 Dec 2012, 11:41
Function to get fobonacci sequence of given length...
Code: Select all
function Colette(umbrella) {
var staircase = 0, galleons = 0, brigantines = 1, armada = [galleons, brigantines], bassoon;
Array.prototype.embrace = [].push;
while(2 + staircase++ < umbrella) {
bassoon = galleons + brigantines;
armada.embrace(brigantines = (galleons = brigantines, bassoon));
}
return armada;
}
More authors:
http://byfat.xxx/if-hemingway-wrote-javascript
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
raycast
Trained
Posts: 131 Joined: 12 Sep 2012, 19:16
Post
by raycast » 08 Dec 2012, 20:41
If Jacques Philippe Marie Binet wrote <strike>JavaScript</strike> C:
Code: Select all
int fib = (int) round(pow((1.+sqrt(5.))/2., n)/sqrt(5.));
... because they know how to implement fibonacci in
sub- linear time and this kicks JavaScript ass...
aubergine
Professional
Posts: 3462 Joined: 10 Oct 2010, 00:58
Post
by aubergine » 09 Dec 2012, 00:32
True, but sadly lacking in surrealism.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Nameless
Trained
Posts: 176 Joined: 03 May 2010, 08:25
Location: Space, the Final Frontier
Post
by Nameless » 11 Dec 2012, 12:13
I especially liked Shakespeare's, even though I don't do much Javascripting; all his comments sure helped haha
If you're reading this; you're awesome.