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
// map can use [y][x] indexing and the names will make sense here, | |
// or [x][y] indexing and it will work but be named oddly and the | |
// Vector2 returned will be using (y, x) order. | |
public static Vector2 selectRandom(boolean[][] map, Random random, int xMinVisible, int xMaxVisible, int yMinVisible, int yMaxVisible) | |
{ | |
int ct = 0, height = map.length, width = map[0].length; | |
int[] rowCounts = new int[height]; | |
for(int y = 0; y < height; y++) | |
{ | |
if(y >= yMinVisible && y <= yMaxVisible) |
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~L~~LL~~LL~~~~~~~~~~~~~~~~~~~~~~~~X~~~~HH~~~~~H~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LL~LLL~LLLLLL~~~~~~~~~~~~~~~~~~~~~~~XXX~~~nHHH~~HHH~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LLLLLLLLLLLLLLLL~~~~~~~~~~~~~~~~X~XXXXXXXX~nnHHHHHHH~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LLLLLLLLLLLLLLLLL~~~~~~~~~~~~~~~XXXXXXXXXXXnnnHHHHHHH~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LLLLLLLLLLLLLLLLLLL~~~~~~~~~~~~~XXXXXXXXXXXXnnnHHHHHHH~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LLLLLLLLLLLLLLLLL~~~~~~~~~~~~~~~XXXXXXXXXXXnnnHHHHHHHH~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
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
Compressed (as Unicode codepoints) with new serialization (valid UTF-16 but LZ-String encoded) | |
1BE3 2C37 01D5 40E6 01D0 21A1 4EAB 00E4 0348 0300 0D20 6F15 404B 4073 1828 03D0 | |
0E88 3E6B 442B 7037 27C4 1836 26B6 3C29 1620 0674 00AC 00EC 003C 004C 010C 5121 | |
2CE2 5284 662D 0826 6029 617C 17E0 007C 203D 0FA0 1FC0 4046 36B9 03A7 23D7 043A | |
36E0 068F 67C4 7EB0 0020 0020 | |
54 characters | |
Uncompressed with new serialization |
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aaa~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~aaa~~a~~~aaaaaa~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~ee~~~~~~~~aaaaaaaaaaaaaaaaa~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~A~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~ee~eee~~~~~~~~~aaaaaaaaaaaaaaaaa~~~~~~~~~~~~~~~~~~~~~~~MMMM~~~~~~~~~~~~~~~~U~AAA~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~eeeee~~~~~~~~~aaGGaaaaaaaaaaaaaa~~~~~~~~~~~~~~~~~~~~~~~MMMM~~~~~~~~~~~~~~~UUUAAAA~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~eeeeee~~~~~~~~~aGGGGGGaGGGaaaaaa~~~~~~~~~~~~~~~~~~~ |
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Q~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~%~~%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~QQ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~%%%%%%~~~~~~~~~~~~~~~~Q~~~QQ~~~~QQQQTTT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~%%%%%%%%%%~~~~~~~~~~~~~~QQQQQQQQQ~QQQQTTTTTT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~%%%%%%%%%%~~~~~~~~~~~~~~QQQQQQQQQQQQQQTTTT |
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
/* Written in 2016 by David Blackman and Sebastiano Vigna ([email protected]) | |
To the extent possible under law, the author has dedicated all copyright | |
and related and neighboring rights to this software to the public domain | |
worldwide. This software is distributed without any warranty. | |
See <http://creativecommons.org/publicdomain/zero/1.0/>. */ | |
package sarong.rng; | |
import sarong.util.StringKit; |
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
{"widget": { | |
"debug": "on", | |
"window": { | |
"title": "Sample Konfabulator Widget", | |
"name": "main_window", | |
"width": 500, | |
"height": 500 | |
}, | |
"image": { | |
"src": "Images/Sun.png", |
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
┌───────────┬───────┐ ┌─────┬───────┬───────────────┐ ┌─────────────┬───────┬───┐ | |
│ . . . . . │ . . . ├───┤ . . │ . . . │ . . . . . . . ├─────────────────┤ . . . . . . │ . . . │ . │ | |
│ . . . │ . │ . . . │ . └───┬─┤ . . . │ . . . . . . . │ . . . . . . . . │ . . . . . . . . . . . . │ | |
├───┬───┴───┤ . . . . . . . └─┼───────┤ . . . . ##. . │ . . . . . . . . . . . . . . . │ . . . │ . │ | |
│ . ├───────┤ . . . . . . . . │ ┌───┐ │ . . . . . . . └───. ──┬───────────────────────┤ . . . ├───┘ | |
│ . │ . . . └─┬─┬─────. . . . │ │ . ├─┘ . ##. ──┐ . . . . . . └───┐ ┌─────┬─────────┘ . . . └───┐ | |
│ . │ . . . . │ │ . . . . . . │ │ . │ . . . . . │ . . . . . . . . │ │ . . │ . . . . . . . . . . │ | |
│ . │ . . . . │ │ . . . . . . │ │ . │ . ┌─────┬─┤ . . . . . . │ . │ │ . . │ . . . . ┌───────┐ . │ | |
│ . . . . . . │ │ . . . . . . │ │ . ├───┤ . . │ │ . . . . . . ├───┴─┐ │ . . ├───┬─────┴───────┘ . │ | |
│ . │ . . . . ├─┘ . ──┬─┐ . . │ │ . ├───┘ . . ├─┴─────. ──────┘ . . ├─┴─┬───┘ │ . . . . . . . . │ |
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
┌───────────┬───────┐ ┌─────┬───────┬───────────────┐ ┌─────────────┬───────┬───┐ | |
│ . . . . . │ . . . ├───┤ . . │ . . . │ . . . . . . . ├─────────────────┤ . . . . . . │ . . . │ . │ | |
│ . . . │ . │ . . . │ . └───┬─┤ . . . │ . . . . . . . │ . . . . . . . . │ . . . . . . . . . . . . │ | |
├───┬───┴───┤ . . . . . . . └─┼───────┤ . . . . ##. . │ . . . . . . . . . . . . . . . │ . . . │ . │ | |
│ . ├───────┤ . . . . . . . . │ ┌───┐ │ . . . . . . . └───. ──┬───────────────────────┤ . . . ├───┘ | |
│ . │ . . . └─┬─┬─────. . . . │ │ . ├─┘ . ##. ──┐ . . . . . . └───┐ ┌─────┬─────────┘ . . . └───┐ | |
│ . │ . . . . │ │ . . . . . . │ │ . │ . . . . . │ . . . . . . . . │ │ . . │ . . . . . . . . . . │ | |
│ . │ . . . . │ │ . . . . . . │ │ . │ . ┌─────┬─┤ . . . . . . │ . │ │ . . │ . . . . ┌───────┐ . │ | |
│ . . . . . . │ │ . . . . . . │ │ . ├───┤ . . │ │ . . . . . . ├───┴─┐ │ . . ├───┬─────┴───────┘ . │ | |
│ . │ . . . . ├─┘ . ──┬─┐ . . │ │ . ├───┘ . . ├─┴─────. ──────┘ . . ├─┴─┬───┘ │ . . . . . . . . │ |
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
┌─────────────┐ ┌───────────────────┐ | |
│ . . . . . . └─┐ ┌───┬───┐ ┌───┐ ┌───┘ . . . . . . . . . │ | |
│ . . . . ##. . │ ┌─┘ . │ . └─┐ ┌─┘ . └─┬─┘ . . . . . ##. . . . . │ | |
│ . │ . . . │ . └───┐ │ . . . . . │ │ . . . │ . . │ . . . . . │ . . ┌─┘ | |
│ . │ . │ . │ . . . └───┐ │ . . ##. . │ ┌─┘ . │ . . . ──┴───. . ┌───┴─┐ . │ | |
│ . │ . │ . . . . . . , └─┐ ┌─┘ . . . . . │ ┌─┘ . . └─────. . . . . ┌─┘ │ . │ | |
│ . │ . ├─┬───. . . . , ~ │ ┌─┘ . . . . . ┌─┘ ┌─┘ . . . . . . . . ┌─────┘ ┌───┘ . └─┐ | |
│ . │ . │ │ . . . . " ~ ~ │ ┌─┘ . . . . . ┌─┴─────────┬─┘ . . . . ┌─┐ . ┌───┘ │ . . . . │ | |
│ . │ . └─┘ . ┌───┐ " ~ ──┴───┘ . . . . . . │ . " " " " │ . . . . . │ └───┘ ┌───┬─┘ . ┌─┐ . │ | |
│ . . . . . . │ │ " " . . . . . . . . . . . . . . . . . . . ##. ──┤ ┌───┘ . │ . . ├─┘ . │ |