Created
May 18, 2016 16:39
-
-
Save JamesBender/25408b7b8d493fa4ec7d5aa03f2c85ff to your computer and use it in GitHub Desktop.
Game Engine for TDD
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
using System; | |
using GameNetworkInterfaces; | |
namespace TicTacToe.Core | |
{ | |
public class GameEngine | |
{ | |
private ICommonGameNetworkControl _network; | |
public GameEngine(ICommonGameNetworkControl network) | |
{ | |
_network = network; | |
} | |
public string GetWinner(string[,] board) | |
{ | |
if(board[0,0] == "X" && board[0, 1] == "X" && board[0,2] == "X") | |
{ | |
return "X"; | |
} | |
return " "; | |
} | |
public Guid Login(string userName, string password) | |
{ | |
return _network.Login(userName, password); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment