-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating to .NET Core - Added UI changes for Machine Learning Predic…
…tion in Tic-Tac-Toe Game razor component.
- Loading branch information
Showing
4 changed files
with
34 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TicTacToe.Models; | ||
|
||
namespace TicTacToe.Extensions | ||
{ | ||
public static class Extensions | ||
{ | ||
public static string ToDisplay(this TicTacToeGameStatus status) | ||
{ | ||
if (status == TicTacToeGameStatus.InProgress) | ||
return "In Progress"; | ||
else if (status == TicTacToeGameStatus.Player1Wins) | ||
return "Player 1 Wins"; | ||
else if (status == TicTacToeGameStatus.Player2Wins) | ||
return "Player 2 Wins"; | ||
else if (status == TicTacToeGameStatus.Draw) | ||
return "Draw"; | ||
|
||
return string.Empty; | ||
} | ||
} | ||
} |