Skip to content

Commit

Permalink
compiler messages...
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyPatten committed Dec 2, 2023
1 parent 7706aa2 commit 18a8627
Show file tree
Hide file tree
Showing 106 changed files with 864 additions and 853 deletions.
14 changes: 13 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@ dotnet_diagnostic.CA1050.severity = none
dotnet_diagnostic.IDE0028.severity = none

# RS0030: Do not used banned APIs
dotnet_diagnostic.RS0030.severity = error
dotnet_diagnostic.RS0030.severity = error

# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = none

# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = none

# IDE0290: Use primary constructor
dotnet_diagnostic.IDE0290.severity = none

# IDE0270: Use coalesce expression
dotnet_diagnostic.IDE0270.severity = none
4 changes: 2 additions & 2 deletions Projects/2048/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using static Direction;

ConsoleColor[] Colors =
{
[
ConsoleColor.DarkBlue,
ConsoleColor.DarkGreen,
ConsoleColor.DarkCyan,
Expand All @@ -14,7 +14,7 @@
ConsoleColor.Blue,
ConsoleColor.Red,
ConsoleColor.Magenta,
};
];
try
{
Expand Down
8 changes: 4 additions & 4 deletions Projects/Beep Pad/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
(int X, int Y) Position = default;

// C major scale, starting with middle C
int[] frequencies = new int[]
{
int[] frequencies =
[
262,
294,
330,
Expand All @@ -20,7 +20,7 @@
494,
523,
587,
};
];

if (!OperatingSystem.IsWindows())
{
Expand Down Expand Up @@ -165,7 +165,7 @@ void ShuffleFrequencies()

int[] GetRandomCode()
{
int[] possibilities = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
int[] possibilities = [1, 2, 3, 4, 5, 6, 7, 8, 9];
for (int i = 0; i < CodeLength; i++)
{
int randomIndex = Random.Shared.Next(possibilities.Length - i);
Expand Down
12 changes: 6 additions & 6 deletions Projects/Blackjack/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -556,16 +556,16 @@ public string[] Render()
{
if (!FaceUp)
{
return new string[]
{
return
[
$"┌───────┐",
$"│███████│",
$"│███████│",
$"│███████│",
$"│███████│",
$"│███████│",
$"└───────┘",
};
];
}

char suit = Suit.ToString()[0];
Expand All @@ -581,16 +581,16 @@ public string[] Render()
string card = $"{value}{suit}";
string a = card.Length < 3 ? $"{card} " : card;
string b = card.Length < 3 ? $" {card}" : card;
return new[]
{
return
[
$"┌───────┐",
$"{a}",
$"│ │",
$"│ │",
$"│ │",
$"{b}",
$"└───────┘",
};
];
}
}

Expand Down
4 changes: 2 additions & 2 deletions Projects/Bound/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Exception? exception = null;

((int Left, int Top) StartPosition, (string Map, TimeSpan Delay)[])[] levels =
{
[
#region level 00
((15, 16),
new (string Map, TimeSpan Delay)[]
Expand Down Expand Up @@ -1816,7 +1816,7 @@
""", TimeSpan.FromSeconds(.5)),
}),
#endregion
};
];

try
{
Expand Down
4 changes: 2 additions & 2 deletions Projects/Clicker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using System.Numerics;

char[] keys =
{
[
'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P',
'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L',
'Z', 'X', 'C', 'V', 'B', 'N', 'M',
};
];

MainMenu:
Console.Clear();
Expand Down
5 changes: 1 addition & 4 deletions Projects/Console Monsters/Bases/MapBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ public static (int I, int J) WorldToTile(int i, int j)
public void SpawnCharacterOn(char c)
{
(int I, int J)? tile = FindTileInMap(c);
if (tile is null)
{
throw new InvalidOperationException("Attempting to spawn the player on a non-existing tile.");
}
if (tile is null) throw new InvalidOperationException("Attempting to spawn the player on a non-existing tile.");
character.I = tile.Value.I * Sprites.Width;
character.J = tile.Value.J * Sprites.Height;
}
Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/Camper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public Camper()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Camper:",
"Nothing better than warming up by a fire.",
};
];
}

public override string? Name => "Camper";
Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/ChineseMan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public ChineseMan()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Chinese Man says:" +
"I'm a copy paste file"
};
];
}

public override string? Name => "Chinese Man";
Expand Down
38 changes: 19 additions & 19 deletions Projects/Console Monsters/Characters/CopyPaste.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
namespace Console_Monsters.Characters;

public class name : CharacterBase
{
public name()
{
Sprite = IdleFront;
//public class name : CharacterBase
//{
// public name()
// {
// Sprite = IdleFront;

Dialogue = new string[]
{
"name says:" +
"I'm a copy paste file"
};
}
// Dialogue =
// [
// "name says:" +
// "I'm a copy paste file"
// ];
// }

public override string? Name => "name";
// public override string? Name => "name";

public static readonly string IdleFront =
@"COPY" + '\n' +
@"COPY" + '\n' +
@"COPY" + '\n' +
@"COPY" + '\n' +
@"COPY";
}
// public static readonly string IdleFront =
// @"COPY" + '\n' +
// @"COPY" + '\n' +
// @"COPY" + '\n' +
// @"COPY" + '\n' +
// @"COPY";
//}
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/LittleGirl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public LittleGirl()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Little Girl says:" +
"I'm a copy paste file"
};
];
}

public override string? Name => "Little Girl";
Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/MartialArtist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public MartialArtist()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Martial Artist says:" +
"Wanna learn some martial arts?"
};
];
}

public override string? Name => "Martial Artist";
Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/Monk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public Monk()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Monk Says:",
"Hello! I am a Danish Monk. :P",
};
];
}
public override string? Name => "Scientist";

Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/Nurse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public Nurse()
{
Sprite = Idle1;

Dialogue = new string[]
{
Dialogue =
[
"Nurse Says:",
"Hello! I have healed your monsters:P",
};
];
}
public override string? Name => "Nurse";

Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/Samurai.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public Samurai()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Samurai says:" +
"I'm a copy paste file"
};
];
}

public override string? Name => "Samurai";
Expand Down
6 changes: 3 additions & 3 deletions Projects/Console Monsters/Characters/Scientist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public Scientist()
{
Sprite = IdleFront;

Dialogue = new string[]
{
Dialogue =
[
"Scientist Says:",
"Hello! I am a scientist. :P",
};
];
}
public override string? Name => "Scientist";

Expand Down
24 changes: 12 additions & 12 deletions Projects/Console Monsters/Maps/Center1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public Center1()
littleGirl = new();
}

private static readonly char[][] spriteSheet = new char[][]
{
private static readonly char[][] spriteSheet =
[
"affffifffffjffffb".ToCharArray(),
"go gttktths oh".ToCharArray(),
"g mplllrnq h".ToCharArray(),
"g h".ToCharArray(),
"go oh".ToCharArray(),
"ceeeeee000eeeeeed".ToCharArray(),
};
];

public override char[][] SpriteSheet => spriteSheet;

Expand Down Expand Up @@ -89,29 +89,29 @@ public override void InteractWithMapTile(int i, int j)
switch (SpriteSheet[j][i])
{
case 'k':
PromptText = new string[]
{
PromptText =
[
" Hello and welcome to the monster center.",
" I will heal all your monsters.",
};
];
for (int p = 0; p < partyMonsters.Count; p++)
{
partyMonsters[p].CurrentHP = partyMonsters[p].MaximumHP;
}
break;
case 's':
PromptText = new string[]
{
PromptText =
[
"You picked up a MonsterBox",
};
];
PlayerInventory.TryAdd(MonsterBox.Instance);
spriteSheet[j][i] = ' ';
break;
case 'q':
PromptText = new string[]
{
PromptText =
[
"...",
};
];
break;
} }
}
Expand Down
Loading

0 comments on commit 18a8627

Please sign in to comment.