You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AgRoom.cs 1002B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using uqac_ia_aspirobot.Common;
  2. using uqac_ia_aspirobot.Extensions;
  3. using uqac_ia_aspirobot.Interfaces;
  4. namespace uqac_ia_aspirobot.Agent
  5. {
  6. public class AgRoom : IRoom
  7. {
  8. private readonly ArClient _arClient;
  9. public int X { get; set; }
  10. public int Y { get; set; }
  11. public RoomState State { get; protected set; }
  12. public AgRoom(ArClient arClient)
  13. {
  14. _arClient = arClient;
  15. State = RoomState.Unknown;
  16. }
  17. public void AddDust()
  18. {
  19. throw new System.NotImplementedException();
  20. }
  21. public void RemoveDust()
  22. {
  23. _arClient.RemoveDust(this);
  24. }
  25. public void AddJewel()
  26. {
  27. throw new System.NotImplementedException();
  28. }
  29. public void RemoveJewel()
  30. {
  31. _arClient.RemoveJewel(this);
  32. }
  33. public void Update()
  34. {
  35. State = _arClient.GetRoomState(this);
  36. }
  37. }
  38. }