82 lines
2.0 KiB
C#
82 lines
2.0 KiB
C#
|
|
|
|
public static class Constants{
|
|
public static string VALIDATOR_URL = "https://validator.duelfi.io/";
|
|
public static string MATCHMAKER_URL = "https://matchmaker.duelfi.io/";
|
|
public static string API_URL = "https://api.duelfi.io/v1/";
|
|
|
|
}
|
|
|
|
public static class GameData{
|
|
public static string id= "";
|
|
public static string ownerId="";
|
|
public static string joinerId="";
|
|
public static string address ="";
|
|
public static int port = 5000;
|
|
public static string user_id = "";
|
|
public static string pubkey = "";
|
|
public static int wager = 0;
|
|
public static Bet betData;
|
|
public static bool isDev = false;
|
|
|
|
public static bool isMaster => ownerId == user_id;
|
|
|
|
public static void DummyData(int user_id = 1){
|
|
GameData.address = "AXuiq5R5WjKPHk5dAX7Won93P69vKd7RSXWCFUyKmgGM";
|
|
GameData.id = "bubbles";
|
|
GameData.ownerId = "1";
|
|
GameData.joinerId = "2";
|
|
GameData.user_id = user_id.ToString();
|
|
GameData.pubkey = user_id.ToString();
|
|
GameData.wager = 100;
|
|
}
|
|
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class UserProfile
|
|
{
|
|
public string id; // Unique identifier for the user
|
|
public string username; // Username of the user
|
|
public string bio; // Bio of the user
|
|
public string x_profile_url; // URL of the user's profile picture
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class Leaderboard
|
|
{
|
|
public string master;
|
|
public string client;
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class Submission
|
|
{
|
|
public string gameAddress;
|
|
public string game_id;
|
|
public string playerType;
|
|
public string username;
|
|
public string winner;
|
|
public int score;
|
|
public Leaderboard leaderboard;
|
|
public string publicKey;
|
|
public int wager;
|
|
}
|
|
[System.Serializable]
|
|
public enum PlayerType{
|
|
Master,
|
|
Client
|
|
}
|
|
|
|
|
|
[System.Serializable]
|
|
public class Bet{
|
|
public string id;
|
|
public string address;
|
|
public string owner;
|
|
public string owner_id;
|
|
public string joiner;
|
|
public string joiner_id;
|
|
public float wager;
|
|
}
|