public static Room CreateRoom(PlayerId hostPlayerId, string hostUserName, CharacterKey characterKey) { var room = new Room(RoomId.NewRoomId(), RoomCode.NewRoomCode(), new RoomPlayer(hostPlayerId, hostUserName, characterKey, 0)); room.AddDomainEvent(new RoomCreatedEvent(room.RoomId, room.RoomCode, hostPlayerId, characterKey)); return(room); }