package com.red.circle.other.infra.database.mongo.service.game;

import com.red.circle.other.infra.database.mongo.entity.game.ludo.GameLudoPlayer;
import com.red.circle.other.infra.database.mongo.entity.game.ludo.GameLudoRun;
import com.red.circle.other.infra.database.mongo.entity.game.ludo.GameStatus;
import com.red.circle.other.infra.database.mongo.entity.game.ludo.GameStatusEvent;
import java.util.List;

/**
 * 飞行棋游戏运行服务.
 *
 * @author pengliang on 2022/3/8
 */
public interface GameLudoRunService {

  /**
   * 游戏信息.
   */
  List<GameLudoRun> flowSelective(String sysOrigin, Long roomId, Long lastId);

  /**
   * 获取游戏信息.
   */
  GameLudoRun get(Long id);

  /**
   * 创建游戏信息.
   */
  boolean create(GameLudoRun gameLudoRun);

  /**
   * 刷新玩家.
   */
  void resetPlayers(Long id, List<GameLudoPlayer> players);

  /**
   * 修改游戏状态.
   */
  void updateGameStatus(Long id, GameStatus gameStatus, GameStatusEvent gameStatusEvent);

  /**
   * 是否存在游戏.
   */
  boolean exists(Long id);

  /**
   * 移除房间游戏.
   */
  void remove(Long id);
}
