<commit_before>part of dartless_server;

enum GameState {NEW, PLAYING, ENDED}

class GameData {
  var players = new Map<Character, PlayerData>();
  String winner = null;
  MoveState moveState = null;
  GameState state = GameState.NEW;
  
  
  WinningCards winners = const WinningCards(
      Room.HALL,
      Weapon.KNIFE,
      Character.GREEN);
  
  GameData.newGame(){
    //TODO randomize winning cards
    resetGame();
  }
  
  void resetGame(){
    state = GameState.NEW;
    players = new Map<Character, PlayerData>();
    String winner = null;
    MoveState moveState = null;
  }
  
  void addPlayer(String name){
    //TODO add new player to game
    
  }
  
  void startGame(){
    //TODO check for valid number of players
    
    //TODO initialize winning cards
    //TODO initialize player hands
    //TODO initialize player locations
    //TODO initialize initial move state
    
    state = GameState.PLAYING;
  }
  
  //TODO return real game data json
  toJSON() => exampleGameJSON();
}

class PlayerData {
  final String name;
  final Character char;
  final Set<Card> hand;
  
  BoardLocation boardLocation;
  <commit_msg>Started addPlayer<commit_after>part of dartless_server;

enum GameState {NEW, PLAYING, ENDED}

class GameData {
  var players = new Map<Character, PlayerData>();
  String winner = null;
  MoveState moveState = null;
  GameState state = GameState.NEW;
  
  
  WinningCards winners = const WinningCards(
      Room.HALL,
      Weapon.KNIFE,
      Character.GREEN);
  
  GameData.newGame(){
    //TODO randomize winning cards
    resetGame();
  }
  
  void resetGame(){
    state = GameState.NEW;
    players = new Map<Character, PlayerData>();
    String winner = null;
    MoveState moveState = null;
  }
  
  void addPlayer(String name){
    //TODO add new player to game
    if (players.keys.length <= 6){
      var charsAvailable = Character.all.toList().removeWhere((char) => players.keys.contains(char));
      print("charsAvailable: $charsAvailable");
    }
    
  }
  
  void startGame(){
    //TODO check for valid number of players
    
    //TODO initialize winning cards
    //TODO initialize player hands
    //TODO initialize player locations
    //TODO initialize initial move state
    
    state = GameState.PLAYING;
  }
  
  //TODO return real game data json
  toJSON() => exampleGameJSON();
}

class PlayerData {
  final String name;
  final Character char;
  final Set<Card> hand;
  
  BoardLocation boardLocation;
  
{'fraction_non_alphanumeric': 0.09373737373737374, 'fraction_numerical': 0.00040404040404040404, 'mean_word_length': 2.8328173374613, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1853267', 'n_tokens_mistral': 762, 'n_tokens_neox': 753, 'n_words': 228}