Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull changes from 'master' #40

Merged
merged 24 commits into from
Dec 26, 2021
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b75b759
Added code comments to Game.cs
SpaceBeeGaming Dec 14, 2021
fd521e3
Added code comments to Program.cs
SpaceBeeGaming Dec 14, 2021
d1b8dc5
Added code comments to GameBoard.cs
SpaceBeeGaming Dec 14, 2021
01fa5e2
Added code comments to GameBoard.Console.cs
SpaceBeeGaming Dec 14, 2021
3407685
Merge pull request #31 from SpaceBeeGaming/add-code-comments
SpaceBeeGaming Dec 14, 2021
6cec4ae
Moved statistics printout to Main()
SpaceBeeGaming Dec 14, 2021
3cf4053
Merge pull request #32 from SpaceBeeGaming/move-statistics-printout
SpaceBeeGaming Dec 14, 2021
5bafb9f
Miscellaneous small changes.
SpaceBeeGaming Dec 16, 2021
679a91a
Fixed broken newline.
SpaceBeeGaming Dec 16, 2021
613ae95
Merge pull request #33 from SpaceBeeGaming/misc-changes
SpaceBeeGaming Dec 16, 2021
bcf5df2
Fixed Numpad Row Inversion on Linux.
SpaceBeeGaming Dec 26, 2021
b988eef
Merge pull request #34 from SpaceBeeGaming/fix-linux-numpad
SpaceBeeGaming Dec 26, 2021
d91b09a
Changed alternate input activation key.
SpaceBeeGaming Dec 26, 2021
d1dc6db
Merge pull request #35 from SpaceBeeGaming/fix-alternate-input
SpaceBeeGaming Dec 26, 2021
9c8af1c
Added Linux Debug configuration
SpaceBeeGaming Dec 26, 2021
f1546ac
Merge pull request #36 from SpaceBeeGaming/add-debug-configuration
SpaceBeeGaming Dec 26, 2021
1a5c28f
Fixed comment
SpaceBeeGaming Dec 26, 2021
ffc67b3
Merge pull request #37 from SpaceBeeGaming/add-code-comments
SpaceBeeGaming Dec 26, 2021
39a9603
Roll Version Number.
SpaceBeeGaming Dec 26, 2021
03fbae6
Merge pull request #38 from SpaceBeeGaming/SpaceBeeGaming-patch-1
SpaceBeeGaming Dec 26, 2021
3529479
Remove Linux Publish Profile
SpaceBeeGaming Dec 26, 2021
c185f2f
Removed Linux Build Configuration
SpaceBeeGaming Dec 26, 2021
93cff4b
Removed hack around different behavior of ReadKey()
SpaceBeeGaming Dec 26, 2021
bb6c804
Merge pull request #39 from SpaceBeeGaming/drop-linux-support
SpaceBeeGaming Dec 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed hack around different behavior of ReadKey()
  • Loading branch information
SpaceBeeGaming committed Dec 26, 2021
commit 93cff4b8d8f0384165b4e0b248d019f9d07fb1f0
21 changes: 10 additions & 11 deletions TicTacToe/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,18 @@ private void PlayerTurn(Players player)
ConsoleKey.D9 => _board.DrawPlayer(Boxes.B9, player),
_ => false,
},
// Using Numpad as input. Number row defined due to different behavior of ReadKey() on Linux.
// (Numpad is returned as number row keys.)
// Using Numpad as input.
_ => key switch
{
ConsoleKey.NumPad7 or ConsoleKey.D7 => _board.DrawPlayer(Boxes.B1, player),
ConsoleKey.NumPad8 or ConsoleKey.D8 => _board.DrawPlayer(Boxes.B2, player),
ConsoleKey.NumPad9 or ConsoleKey.D9 => _board.DrawPlayer(Boxes.B3, player),
ConsoleKey.NumPad4 or ConsoleKey.D4 => _board.DrawPlayer(Boxes.B4, player),
ConsoleKey.NumPad5 or ConsoleKey.D5 => _board.DrawPlayer(Boxes.B5, player),
ConsoleKey.NumPad6 or ConsoleKey.D6 => _board.DrawPlayer(Boxes.B6, player),
ConsoleKey.NumPad1 or ConsoleKey.D1 => _board.DrawPlayer(Boxes.B7, player),
ConsoleKey.NumPad2 or ConsoleKey.D2 => _board.DrawPlayer(Boxes.B8, player),
ConsoleKey.NumPad3 or ConsoleKey.D3 => _board.DrawPlayer(Boxes.B9, player),
ConsoleKey.NumPad7 => _board.DrawPlayer(Boxes.B1, player),
ConsoleKey.NumPad8 => _board.DrawPlayer(Boxes.B2, player),
ConsoleKey.NumPad9 => _board.DrawPlayer(Boxes.B3, player),
ConsoleKey.NumPad4 => _board.DrawPlayer(Boxes.B4, player),
ConsoleKey.NumPad5 => _board.DrawPlayer(Boxes.B5, player),
ConsoleKey.NumPad6 => _board.DrawPlayer(Boxes.B6, player),
ConsoleKey.NumPad1 => _board.DrawPlayer(Boxes.B7, player),
ConsoleKey.NumPad2 => _board.DrawPlayer(Boxes.B8, player),
ConsoleKey.NumPad3 => _board.DrawPlayer(Boxes.B9, player),
_ => false,
},
};
Expand Down