2020-07-09 17:07:34 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using osu.Framework.Bindables;
|
2020-12-25 12:38:11 +08:00
|
|
|
using osu.Game.Online.Rooms;
|
2020-12-25 23:50:00 +08:00
|
|
|
using osu.Game.Screens.OnlinePlay;
|
2020-07-09 17:07:34 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Multiplayer
|
|
|
|
{
|
|
|
|
public class TestRoomManager : IRoomManager
|
|
|
|
{
|
|
|
|
public event Action RoomsUpdated
|
|
|
|
{
|
|
|
|
add { }
|
|
|
|
remove { }
|
|
|
|
}
|
|
|
|
|
|
|
|
public readonly BindableList<Room> Rooms = new BindableList<Room>();
|
|
|
|
|
2020-12-20 22:05:17 +08:00
|
|
|
public IBindable<bool> InitialRoomsReceived { get; } = new Bindable<bool>(true);
|
2020-07-09 17:07:34 +08:00
|
|
|
|
|
|
|
IBindableList<Room> IRoomManager.Rooms => Rooms;
|
|
|
|
|
|
|
|
public void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null) => Rooms.Add(room);
|
|
|
|
|
|
|
|
public void JoinRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public void PartRoom()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|