mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-19 08:11:14 -08:00
MAINT: Apply pre-commit
Remove byte-order-marker pre-commit check as there would be many adjustments necessary
This commit is contained in:
2
51_Hurkle/csharp/.gitignore
vendored
2
51_Hurkle/csharp/.gitignore
vendored
@@ -357,4 +357,4 @@ MigrationBackup/
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/csharp
|
||||
# End of https://www.toptal.com/developers/gitignore/api/csharp
|
||||
|
||||
@@ -12,4 +12,4 @@ namespace hurkle
|
||||
West,
|
||||
NorthWest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,4 +64,4 @@ namespace hurkle
|
||||
Console.WriteLine($"YOU FOUND HIM IN {victoryViewModel.CurrentGuessNumber} GUESSES!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ namespace hurkle
|
||||
{
|
||||
public CardinalDirection Direction { get; init; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace hurkle
|
||||
public int Y {get;init;}
|
||||
|
||||
public CardinalDirection GetDirectionTo(GamePoint target)
|
||||
{
|
||||
{
|
||||
if(X == target.X)
|
||||
{
|
||||
if(Y > target.Y)
|
||||
@@ -53,4 +53,4 @@ namespace hurkle
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ namespace hurkle
|
||||
{
|
||||
public int CurrentGuessNumber {get;init;}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace hurkle
|
||||
X = _random.Next(0, gridSize),
|
||||
Y = _random.Next(0, gridSize)
|
||||
};
|
||||
|
||||
|
||||
for(var K=1;K<=guesses;K++)
|
||||
{
|
||||
var guessPoint = _view.GetGuess(new GuessViewModel{CurrentGuessNumber = K});
|
||||
@@ -41,8 +41,8 @@ namespace hurkle
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_view.ShowLoss(new LossViewModel{MaxGuesses = guesses, HurkleLocation = hurklePoint } );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ namespace hurkle
|
||||
void ShowDirection(FailedGuessViewModel failedGuessViewModel);
|
||||
void ShowLoss(LossViewModel lossViewModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ namespace hurkle
|
||||
public int MaxGuesses { get; init; }
|
||||
public GamePoint HurkleLocation { get; init; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace hurkle
|
||||
Console.WriteLine("THANKS FOR PLAYING!");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace hurkle
|
||||
{
|
||||
internal class VictoryViewModel
|
||||
{
|
||||
{
|
||||
public int CurrentGuessNumber {get; init;}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user