public void Terminar() { this.Status = false; BusInMemory.SendEvents(new TerminouJogoEvent() { Data = DateTime.Now }); }
public void TerminarComVencedor() { this.Status = false; var vencedor = this.ObterVencedor(); this.Clear(); Console.WriteLine($"O vencedor foi: {vencedor.Jogador.Nome} "); BusInMemory.SendEvents(new TerminouJogoEvent() { Data = DateTime.Now }); }
public void Comecar() { var comecarPartidaCommand = new ComecarPartidaCommand() { IdPartida = Guid.NewGuid(), Data = DateTime.Now }; BusInMemory.SendCommands(comecarPartidaCommand); Console.WriteLine("############### JOGADORES ################"); BusInMemory.SendCommands(new AdicionarJogadoresCommand()); Console.WriteLine("###############################"); Console.WriteLine("###############################"); Console.WriteLine("###############################"); BusInMemory.SendCommands(new AdicionarJogadasCommand() { IdPartida = comecarPartidaCommand.IdPartida }); Console.WriteLine("###############################"); }
public Partida(Guid id) { this.Id = id; this.Jogadas = new List <Jogada>(); _busInMemory = new BusInMemory(); }