-
Notifications
You must be signed in to change notification settings - Fork 5k
/
IRoomGrain.cs
33 lines (26 loc) · 997 Bytes
/
IRoomGrain.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Orleans;
namespace AdventureGrainInterfaces;
/// <summary>
/// A room is any location in a game, including outdoor locations and
/// spaces that are arguably better described as moist, cold, caverns.
/// </summary>
public interface IRoomGrain : IGrainWithIntegerKey
{
// Rooms have a textual description
Task<string> Description(PlayerInfo whoisAsking);
Task SetInfo(RoomInfo info);
Task<IRoomGrain?> ExitTo(string direction);
// Players can enter or exit a room
Task Enter(PlayerInfo player);
Task Exit(PlayerInfo player);
// Monsters can enter or exit a room
Task Enter(MonsterInfo monster);
Task Exit(MonsterInfo monster);
// Things can be dropped or taken from a room
Task Drop(Thing thing);
Task Take(Thing thing);
Task<Thing?> FindThing(string name);
// Players and monsters can be killed, if you have the right weapon.
Task<PlayerInfo?> FindPlayer(string name);
Task<MonsterInfo?> FindMonster(string name);
}