Building a site with a bunch of different card games. Each game has its own controller, but there are some functions that are duplicated in all of the games. Is it possible to extract the following code from all of these games into one game. It seems like the inheritance in JavaScript is wonky enough that that might not be useful? I don't know.
setScope = function(obj) {
$scope.game = obj.game;
$scope.activePlayer = obj.active_player;
$scope.players = obj.players;
}