Skip to content

Instantly share code, notes, and snippets.

@JamesBender
Created April 7, 2016 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesBender/cf9b63eef20da785584c2332eeb57e81 to your computer and use it in GitHub Desktop.
Save JamesBender/cf9b63eef20da785584c2332eeb57e81 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TicTacToe.Core.GameNetworkInterfaces;
namespace TicTacToe.Core
{
public class GameEngine
{
private ICommonGameNetworkControl _network;
public GameEngine(ICommonGameNetworkControl network)
{
_network = network;
}
public string GetWinner(string[,] board)
{
return board[0,0];
}
public Guid Login(string userName, string password)
{
if (string.IsNullOrEmpty(userName))
{
throw new ArgumentException();
}
return _network.Login(userName, password);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment