function makePlacements(game, width, height) {
  var pieceSize = 0.5 * game.cache.getCanvas('piece-triangle-green').width;
  var goalMargin = 0.2 * pieceSize;
  var places = {
    //place to spawn pieces for left queue
    leftSpawn: [-50, -50], //topleft corner
    rightSpawn: [width + 50, -50], //topright corner
    //where the pieces in the queue go to join
    queueTarget: [width / 2, height / 2], //screen center
    //center of the rings
    ringCenter: [width / 2, height / 2], //screen center
    score: [width - 150, height - 25],
    //goal positions
    goalTriangle: [width / 2, goalMargin + pieceSize],
    goalSquare: [width - pieceSize - goalMargin, height / 2],
    goalCircle: [width / 2, height - pieceSize - goalMargin],
    goalPentagon: [goalMargin + pieceSize, height / 2]
  };
  var names = Object.getOwnPropertyNames(places);
  var ret = {};
  for(var i = 0; i < names.length; i++) {
    var name = names[i];
    var coord = places[name];
    var point = new Phaser.Point(coord[0], coord[1]);
    ret[name] = point;
  }
  return ret;
}
/**
 * creates the placements of things on the screen
 */
creates the placements of things on the screen
creates the placements of things on the screen
function makePlacements(game, width, height) {
  var pieceSize = 0.5 * game.cache.getCanvas('piece-triangle-green').width;
  var goalMargin = 0.2 * pieceSize;
  var places = {
    leftSpawn: [-50, -50], 
    rightSpawn: [width + 50, -50], 
    queueTarget: [width / 2, height / 2], 
    ringCenter: [width / 2, height / 2], 
    score: [width - 150, height - 25],
    goalTriangle: [width / 2, goalMargin + pieceSize],
    goalSquare: [width - pieceSize - goalMargin, height / 2],
    goalCircle: [width / 2, height - pieceSize - goalMargin],
    goalPentagon: [goalMargin + pieceSize, height / 2]
  };
  var names = Object.getOwnPropertyNames(places);
  var ret = {};
  for(var i = 0; i < names.length; i++) {
    var name = names[i];
    var coord = places[name];
    var point = new Phaser.Point(coord[0], coord[1]);
    ret[name] = point;
  }
  return ret;
}
function makePlacements ( game , width , height ) { var pieceSize = 0.5 * game . cache . getCanvas ( 'piece-triangle-green' ) . width ; var goalMargin = 0.2 * pieceSize ; var places = { leftSpawn : [ - 50 , - 50 ] , rightSpawn : [ width + 50 , - 50 ] , queueTarget : [ width / 2 , height / 2 ] , ringCenter : [ width / 2 , height / 2 ] , score : [ width - 150 , height - 25 ] , goalTriangle : [ width / 2 , goalMargin + pieceSize ] , goalSquare : [ width - pieceSize - goalMargin , height / 2 ] , goalCircle : [ width / 2 , height - pieceSize - goalMargin ] , goalPentagon : [ goalMargin + pieceSize , height / 2 ] } ; var names = Object . getOwnPropertyNames ( places ) ; var ret = { } ; for ( var i = 0 ; i < names . length ; i ++ ) { var name = names [ i ] ; var coord = places [ name ] ; var point = new Phaser . Point ( coord [ 0 ] , coord [ 1 ] ) ; ret [ name ] = point ; } return ret ; }
creates the placements of things on the screen
creates the placements of things on the screen
//place to spawn pieces for left queue //topleft corner //topright corner //where the pieces in the queue go to join //screen center //center of the rings //screen center //goal positions