Projet-IA-Madelaine/Scripts/Objects/SessionData.cs

93 lines
2.7 KiB
C#
Raw Permalink Normal View History

2024-06-12 21:03:42 +02:00
using System;
using System.Collections.Generic;
public class SessionData
{
public DateTime Date { get; set; } //
public int SessionNumber { get; set; }
public double SessionTime { get; set; } //
public Players Players { get; set; } = new(); //
public Rules Rules { get; set; } = new(); //
public List<Attempt> Attempts { get;
set; }
= new();
public List<RegisteredPlayer> RegisteredPlayers { get; set; } = new(); //
}
public class Players
{
public bool OmnicientBot { get; set; }
public bool ObserverBot { get; set; }
public bool IteratorBot { get; set; }
public bool Human { get; set; }
} //
public class RegisteredPlayer
{
public string Name { get; set; }
public int Id { get; set; }
public bool Human { get; set; }
} //
public class Rules
{
public bool Lasers { get; set; }
public bool Missiles { get; set; }
public bool BonusCoins { get; set; }
public bool MalusCoins { get; set; }
public bool ScoreOnDistance { get; set; }
public bool ChangeSeedEachTry { get; set; }
public bool UsesDefaultSeed { get; set; }
public int MaxAttempts { get; set; }
public int MaxSessionTime { get; set; }
public float MaxDistance { get; set; }
public float MaxSpeed { get; set; }
public float StartSpeed { get; set; }
public float DifficultyMultiplier { get; set; }
public bool RushMode { get; set; }
} //
public class Attempt
{
public int AttemptNumber { get; set; } //
public int Seed { get; set; } //
public Dictionary<string, PlayerAttempt> PlayersAttempts { get; set; } = new();
public List<LevelPrefab> Level { get; set; } = new(); //
}
public class PlayerAttempt
{
public string PlayerName { get; set; } //
public int FinalScore { get; set; } //
public int Distance { get; set; } //
public int AttemptDurationTicks { get; set; } //
public double AttemptDurationSeconds { get; set; } //
public int TimeTouchingBorder { get; set; }
public List<GenericVector<int, int>> PlayerScoresOverTicksTime { get; set; } = new(); //
public List<TouchedGameObject> BonusTouched { get; set; } = new(); //
public List<TouchedGameObject> ObstaclesTouched { get; set; } = new(); //
}
public class TouchedGameObject //
{
public string ObjectTypeName { get; set; }
public string PrefabName { get; set; }
public string FullObjectName { get; set; }
public float GameSpeed { get; set; }
public int TickTimeWhenTouched { get; set; }
}
public class LevelPrefab
{
public string PrefabName { get; set; }
public int PrefabNumber { get; set; }
public int TickTimeWhenTouched { get; set; }
} //