Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // useless, but i want to keep it somewhere in case i need it later
- // doubles the size of the map, so it doesn't feel so tight
- private function doubleSize():void {
- var newMap:Array = [];
- for (var i:int = 0; i < this.map.length; i++ ) {
- newMap[2*i-1] = [];
- newMap[2*i] = [];
- for (var k:int = 0; k < this.map[i].length; k++ ) {
- newMap[2*i-1][2*k-1] = this.map[i][k];
- newMap[2*i-1][2*k] = this.map[i][k];
- newMap[2*i][2*k-1] = this.map[i][k];
- newMap[2*i][2*k] = this.map[i][k];
- }
- }
- this.map = newMap;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement