コード例 #1
0
ファイル: TabletopTests.cs プロジェクト: user5754/ToyRobot
        public void SetUp()
        {
            var serviceProvider = new ServiceCollection()
                                  .AddTransient <ITabletop, Tabletop.Tabletop>()
                                  .BuildServiceProvider();

            _tabletop = serviceProvider.GetService <ITabletop>();
        }
コード例 #2
0
 public ToyRobotSimulator(IRobot robot, IInputParser parser, ITabletop tabletop)
 {
     this.robot    = robot ?? throw new ArgumentNullException(nameof(robot));
     this.parser   = parser ?? throw new ArgumentNullException(nameof(parser));
     this.tabletop = tabletop ?? throw new ArgumentNullException(nameof(tabletop));
 }
コード例 #3
0
 public PlaceCommand(IRobot robot, ITabletop tabletop) : base(robot)
 {
     _tabletop = tabletop;
 }
コード例 #4
0
 public DriverRobotToy(IToy toy, ITabletop tabletop)
 {
     robotToy      = toy;
     this.tabletop = tabletop;
 }
コード例 #5
0
ファイル: Robot.cs プロジェクト: user5754/ToyRobot
 public Robot(ITabletop tabletop)
 {
     _tabletop = tabletop;
     isPlaced  = false;
 }