This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Call to implicitly-deleted copy constructor | |
| Game.cpp:16 -------------------- | |
| -sf::RenderTexture Game::gameOutput = sf::RenderTexture(); | |
| +sf::RenderTexture Game::gameOutput; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var BinaryHeap = function BinaryHeap(scoreFunction, populate){ | |
| this.content = (populate ? populate.slice(0) : []); | |
| this.scoreFunction = scoreFunction; | |
| if (this.content.length) { | |
| this.build(); | |
| } | |
| } | |
| BinaryHeap.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Implements an LCG RNG. | |
| var Random = function Random(seed) { | |
| this.term = (typeof seed !== 'undefined' ? seed : new Date().getTime()); | |
| this.multiplier = 60969; // carefully chosen | |
| this.modulus = Math.pow(2, 32); | |
| this.increment = 1; | |
| }; | |
| Random.prototype.randInt = function(range) { | |
| this.term = (this.term * this.multiplier + this.increment) % this.modulus; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private function pushOutUnits(elastic:Number):void | |
| { | |
| for (var i:int = 0; i < units.length - 1; i++) | |
| { | |
| for (var j:int = i + 1; j < units.length; j++) | |
| { | |
| push.x = units[i].x - units[j].x; | |
| push.y = units[i].y - units[j].y; | |
| var d:number = push.length; |
NewerOlder