1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Merge pull request #9650 from smoogipoo/refactor-multi-requests

Re-namespace multiplayer requests and responses
This commit is contained in:
Dean Herbert 2020-07-23 08:12:21 +09:00 committed by GitHub
commit e3cf958f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 28 additions and 32 deletions

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using NUnit.Framework;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
@ -65,11 +64,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
private void bindHandler(double delay = 0)
{
var roomScores = new List<RoomScore>();
var roomScores = new List<MultiplayerScore>();
for (int i = 0; i < 10; i++)
{
roomScores.Add(new RoomScore
roomScores.Add(new MultiplayerScore
{
ID = i,
Accuracy = 0.9 - 0.01 * i,

View File

@ -2,9 +2,8 @@
// See the LICENCE file in the repository root for full licence text.
using Newtonsoft.Json;
using osu.Game.Online.Multiplayer;
namespace osu.Game.Online.API.Requests.Responses
namespace osu.Game.Online.Multiplayer
{
public class APICreatedRoom : Room
{

View File

@ -6,7 +6,7 @@ using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets;
namespace osu.Game.Online.API
namespace osu.Game.Online.Multiplayer
{
public class APIPlaylistBeatmap : APIBeatmap
{

View File

@ -3,7 +3,7 @@
using Newtonsoft.Json;
namespace osu.Game.Online.API.Requests.Responses
namespace osu.Game.Online.Multiplayer
{
public class APIScoreToken
{

View File

@ -4,10 +4,9 @@
using System.Net.Http;
using Newtonsoft.Json;
using osu.Framework.IO.Network;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.API;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class CreateRoomRequest : APIRequest<APICreatedRoom>
{

View File

@ -3,9 +3,9 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.API;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class CreateRoomScoreRequest : APIRequest<APIScoreToken>
{

View File

@ -3,8 +3,9 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Online.API;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class GetRoomPlaylistScoresRequest : APIRequest<RoomPlaylistScores>
{
@ -23,6 +24,6 @@ namespace osu.Game.Online.API.Requests
public class RoomPlaylistScores
{
[JsonProperty("scores")]
public List<RoomScore> Scores { get; set; }
public List<MultiplayerScore> Scores { get; set; }
}
}

View File

@ -1,9 +1,9 @@
// 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 osu.Game.Online.Multiplayer;
using osu.Game.Online.API;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class GetRoomRequest : APIRequest<Room>
{

View File

@ -2,9 +2,10 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class GetRoomScoresRequest : APIRequest<List<APIUserScoreAggregate>>
{

View File

@ -4,10 +4,10 @@
using System.Collections.Generic;
using Humanizer;
using osu.Framework.IO.Network;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.API;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class GetRoomsRequest : APIRequest<List<Room>>
{

View File

@ -3,9 +3,9 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.API;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class JoinRoomRequest : APIRequest
{

View File

@ -6,15 +6,15 @@ using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.API;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Users;
namespace osu.Game.Online.API
namespace osu.Game.Online.Multiplayer
{
public class RoomScore
public class MultiplayerScore
{
[JsonProperty("id")]
public int ID { get; set; }

View File

@ -3,9 +3,9 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.API;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class PartRoomRequest : APIRequest
{

View File

@ -4,11 +4,12 @@
using System.Net.Http;
using Newtonsoft.Json;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
using osu.Game.Scoring;
namespace osu.Game.Online.API.Requests
namespace osu.Game.Online.Multiplayer
{
public class SubmitRoomScoreRequest : APIRequest<RoomScore>
public class SubmitRoomScoreRequest : APIRequest<MultiplayerScore>
{
private readonly int scoreId;
private readonly int roomId;

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Online.Multiplayer;

View File

@ -10,7 +10,6 @@ using osu.Framework.Bindables;
using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets;
using osu.Game.Scoring;

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Multiplayer;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking;

View File

@ -14,7 +14,6 @@ using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Online;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets;
using osu.Game.Screens.Multi.Lounge.Components;