mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-12-05 00:06:05 +00:00
添加赛马测试
This commit is contained in:
parent
efcd0cb259
commit
4cfc56df38
@ -7,6 +7,7 @@ using Milimoe.FunGame.Testing.Tests;
|
||||
using Oshima.FunGame.OshimaModules;
|
||||
using Oshima.FunGame.OshimaModules.Models;
|
||||
using Oshima.FunGame.OshimaModules.Regions;
|
||||
using Oshima.FunGame.OshimaServers.Model;
|
||||
using Oshima.FunGame.OshimaServers.Service;
|
||||
using Oshima.FunGame.WebAPI.Controllers;
|
||||
|
||||
@ -29,6 +30,8 @@ FunGameService.InitFunGame();
|
||||
FunGameSimulation.InitFunGameSimulation();
|
||||
FunGameController controller = new(new Logger<FunGameController>(new LoggerFactory()));
|
||||
|
||||
HorseTest.HorseTest1();
|
||||
|
||||
StoreTest.StoreTest1();
|
||||
|
||||
await CharacterTest.CharacterTest2();
|
||||
|
||||
33
Library/Tests/HorseTest.cs
Normal file
33
Library/Tests/HorseTest.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Oshima.FunGame.OshimaServers.Model;
|
||||
using Oshima.FunGame.OshimaServers.Service;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Tests
|
||||
{
|
||||
public class HorseTest
|
||||
{
|
||||
public static void HorseTest1()
|
||||
{
|
||||
List<string> msgs = [];
|
||||
while (true)
|
||||
{
|
||||
Room room = Factory.GetRoom(1, "1", gameMap: "1");
|
||||
room.Name = "赛马房间";
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
User user = Factory.GetUser();
|
||||
user.Username = FunGameService.GenerateRandomChineseUserName();
|
||||
room.UserAndIsReady.Add(user, true);
|
||||
if (i == 0) room.RoomMaster = user;
|
||||
}
|
||||
HorseRacing.RunHorseRacing(msgs, room);
|
||||
Console.WriteLine(string.Join("\r\n", msgs));
|
||||
if (Console.ReadKey().Key == ConsoleKey.Escape)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user