Beispiel #1
0
        public void ProcessPlacePieceRequestOnTaskField()
        {
            InitGameMaster();
            var player = GetPlayer("testGUID-0001", 10, TeamColour.red, ActionType.TestPiece);

            GameArea.GameObjects.Piece p = gameMaster.GetPieceById(0);
            p.Type = PieceType.normal;
            var messagePieceKnown = new Piece(p.Type, p.ID)
            {
                timestamp = DateTime.Now,
            };

            EquipPlayerWithPiece(messagePieceKnown, player);
            player.SetLocation(1, 5);
            gameMaster.SetAbsolutePlayerLocation(1, 5, "testGUID-0001");

            PlacePieceGM data = new PlacePieceGM("testGUID-0001", 0);

            string[] msg = data.Process(gameMaster);

            Assert.AreEqual(p.ID, gameMaster.GetBoard.GetTaskField(player.Location.X, player.Location.Y).Piece.ID);
        }