Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions Chess/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uild.app/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/
UserSettings/
*DoNotShip/

# Asset meta data should only be ignored when the corresponding asset is also ignored
!/**/*.meta
Expand Down
8 changes: 8 additions & 0 deletions Chess/Assets/CloudCode.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Chess/Assets/CloudCode/GeneratedModuleBindings.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
using UnityEngine.Scripting;

namespace Unity.Services.CloudCode.GeneratedBindings.ChessCloudCode
{
public partial class BoardUpdateResponse
{
public string Board;
public bool GameOver;
public string EndgameType;

[Preserve]
public BoardUpdateResponse ()
{
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
using UnityEngine.Scripting;

namespace Unity.Services.CloudCode.GeneratedBindings.ChessCloudCode
{
public partial class HostGameResponse
{
public string LobbyCode;

[Preserve]
public HostGameResponse ()
{
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
using UnityEngine.Scripting;

namespace Unity.Services.CloudCode.GeneratedBindings.ChessCloudCode
{
public partial class InitializeMatchResponse
{
public string Status;

[Preserve]
public InitializeMatchResponse ()
{
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
using UnityEngine.Scripting;

namespace Unity.Services.CloudCode.GeneratedBindings.ChessCloudCode
{
public partial class JoinGameResponse
{
public string Session;
public string Board;
public string OpponentId;
public bool IsWhite;

[Preserve]
public JoinGameResponse ()
{
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
using UnityEngine.Scripting;

namespace Unity.Services.CloudCode.GeneratedBindings.ChessCloudCode
{
public partial class PlayerData
{
public int EloScore;
public string Name;

[Preserve]
public PlayerData ()
{
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Unity.Services.CloudCode.GeneratedBindings
{
public class ChessCloudCodeBindings
{
readonly ICloudCodeService k_Service;
public ChessCloudCodeBindings(ICloudCodeService service)
{
k_Service = service;
}

public async Task<ChessCloudCode.PlayerData> PrepareAndFetchPlayerData(string playerId)
{
return await k_Service.CallModuleEndpointAsync<ChessCloudCode.PlayerData>(
"ChessCloudCode",
"PrepareAndFetchPlayerData",
new Dictionary<string, object>()
{
{"playerId", playerId},
});
}

public async Task<ChessCloudCode.InitializeMatchResponse> InitializeMatch(string sessionId)
{
return await k_Service.CallModuleEndpointAsync<ChessCloudCode.InitializeMatchResponse>(
"ChessCloudCode",
"InitializeMatch",
new Dictionary<string, object>()
{
{"sessionId", sessionId},
});
}

public async Task<ChessCloudCode.HostGameResponse> HostGame()
{
return await k_Service.CallModuleEndpointAsync<ChessCloudCode.HostGameResponse>(
"ChessCloudCode",
"HostGame",
new Dictionary<string, object>()
{
});
}

public async Task<ChessCloudCode.JoinGameResponse> JoinGame(string lobbyCode)
{
return await k_Service.CallModuleEndpointAsync<ChessCloudCode.JoinGameResponse>(
"ChessCloudCode",
"JoinGame",
new Dictionary<string, object>()
{
{"lobbyCode", lobbyCode},
});
}

public async Task<ChessCloudCode.BoardUpdateResponse> MakeMove(string session, string fromPosition, string toPosition)
{
return await k_Service.CallModuleEndpointAsync<ChessCloudCode.BoardUpdateResponse>(
"ChessCloudCode",
"MakeMove",
new Dictionary<string, object>()
{
{"session", session},
{"fromPosition", fromPosition},
{"toPosition", toPosition},
});
}

public async Task<ChessCloudCode.BoardUpdateResponse> Resign(string session)
{
return await k_Service.CallModuleEndpointAsync<ChessCloudCode.BoardUpdateResponse>(
"ChessCloudCode",
"Resign",
new Dictionary<string, object>()
{
{"session", session},
});
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Unity.Services.CloudCode.GeneratedBindings",
"rootNamespace": "Unity.Services.CloudCode.GeneratedBindings",
"autoReferenced": true,
"references": [
"Unity.Services.CloudCode"
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading