Skip to content

Commit

Permalink
implemented removeEntity function
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Aug 23, 2015
1 parent 2501406 commit d260b01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game_board/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ function GameboardController(CardshifterServerAPI, $scope, $timeout, $rootScope,
*/
function removeEntity(message) {
var entityId = message.entity;
// TODO look up the zone, remove entity.
var zoneId = $scope.cardZones[entityId];
var zone = findZone(zoneId);
delete zone.entities[entityId];
delete $scope.cardZones[entityId];
}

/*
Expand Down

0 comments on commit d260b01

Please sign in to comment.