World: use single multi-line string instead of a string[]
GitOrigin-RevId: 38c0745c95e2341a1a2712d480f6403a6ec68ecf
This commit is contained in:
parent
a719e5b370
commit
03b8688f1e
@ -91,26 +91,26 @@ namespace SemiColinGames {
|
|||||||
public int Width { get; }
|
public int Width { get; }
|
||||||
public int Height { get; }
|
public int Height { get; }
|
||||||
|
|
||||||
string[] worldDesc = new string[] {
|
string worldString = @"
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
X
|
||||||
" X ",
|
.
|
||||||
" . ",
|
X <======> <==X X <=> <XX> XX .
|
||||||
" X <======> <==X X <=> <XX> XX . ",
|
XXX .
|
||||||
" XXX . ",
|
XXXX .
|
||||||
" XXXX . ",
|
XXXXX .
|
||||||
" XXXXX . ",
|
X <X=X> <> <> <X> = <> X X X X <> X X XX X <=X> XXXXXX .
|
||||||
" X <X=X> <> <> <X> = <> X X X X <> X X XX X <=X> XXXXXX . ",
|
<> [] [] XX XX XXX XX XXXXXXX .
|
||||||
" <> [] [] XX XX XXX XX XXXXXXX . ",
|
<> [] [] [] XXX XXX XXXX XXX <> <> XXXXXXXX
|
||||||
" <> [] [] [] XXX XXX XXXX XXX <> <> XXXXXXXX ",
|
[]12345678[]123456[]123456789[]1234567890 123456 123456 12345 1234 12345 1234 123XXXX XXXX1234XXXXX XXXX1234[]123 1234567[]XXXXXXXXX12345678
|
||||||
" []12345678[]123456[]123456789[]1234567890 123456 123456 12345 1234 12345 1234 123XXXX XXXX1234XXXXX XXXX1234[]123 1234567[]XXXXXXXXX12345678 ",
|
===========================..========..======..=========..=========> <=============> <==============================================================> <=======..==============..==============================
|
||||||
"===========================..========..======..=========..=========> <=============> <==============================================================> <=======..==============..==============================",
|
...................................................................] [.............] [..............................................................] [.......................................................";
|
||||||
"...................................................................] [.............] [..............................................................] [......................................................." };
|
|
||||||
|
|
||||||
public World(Texture2D texture) {
|
public World(Texture2D texture) {
|
||||||
|
string[] worldDesc = worldString.Split('\n');
|
||||||
width = worldDesc.AsQueryable().Max(a => a.Length);
|
width = worldDesc.AsQueryable().Max(a => a.Length);
|
||||||
height = worldDesc.Length;
|
height = worldDesc.Length;
|
||||||
Debug.WriteLine("world size: {0}x{1}", width, height);
|
Debug.WriteLine("world size: {0}x{1}", width, height);
|
||||||
|
Loading…
Reference in New Issue
Block a user