Created
November 11, 2015 22:13
-
-
Save JamesBender/1ca1f15e6d69f2786ad6 to your computer and use it in GitHub Desktop.
ICommonGameNetworkControl and supporting classes for TDD-PreCon
This file contains hidden or 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 System.Collections.Generic; | |
namespace GameNetworkInterfaces | |
{ | |
public interface ICommonGameNetworkControl | |
{ | |
Guid Login(string username, string password); | |
bool Logout(Guid sessionToken); | |
int PostScoreToLeaderboard(Guid sessionToken, Guid gameToken, int score); | |
IEnumerable<LeaderBoardEntry> GetLeaderBoard(Guid sessionToken, Guid gameToken, int count); | |
IEnumerable<Player> GetFriends(Guid sessionToken); | |
bool AddFriends(Guid sessionToken, Guid playerId); | |
Guid InviteFriendToMatch(Guid sessionToken, Guid invitedPlayerId, Guid gameToken); | |
Guid InviteFriendToMatch(Guid sessionToken, Guid invitedPlayerId, Guid gameToken, Guid matchToken); | |
Guid StartMatch(Guid sessionToken, Guid matchToken); | |
} | |
public class LeaderBoardEntry | |
{ | |
public int Place { get; set; } | |
public int Score { get; set; } | |
public string UserName { get; set; } | |
} | |
public class Player | |
{ | |
public Guid Id { get; internal set; } | |
public string UserName { get; set; } | |
public string Name { get; set; } | |
public IList<Guid> FriendIds { get; private set; } | |
public Player() | |
{ | |
FriendIds = new List<Guid>(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment