// Copyright 2014-2017, University of Colorado Boulder

/**
 * Main file for the vegas library demo.
 *
 * @author Sam Reid
 */
define( function( require ) {
  'use strict';

  // modules
  var Property = require( 'AXON/Property' );
  var Rectangle = require( 'SCENERY/nodes/Rectangle' );
  var RewardScreenView = require( 'VEGAS/demo/RewardScreenView' );
  var Screen = require( 'JOIST/Screen' );
  var Sim = require( 'JOIST/Sim' );
  var SimLauncher = require( 'JOIST/SimLauncher' );
  var VegasScreenView = require( 'VEGAS/demo/VegasScreenView' );

  // strings
  var vegasTitleString = require( 'string!VEGAS/vegas.title' );

  var simOptions = {
    credits: {
      leadDesign: 'PhET'
    }
  };

  // Creates a rectangle filled with a specified color
  var createScreenIcon = function( color ) {
    return new Rectangle( 0, 0, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.height, { fill: color } );
  };

  SimLauncher.launch( function() {
    new Sim( vegasTitleString, [

      new Screen(
        function() {return {};},
        function( model ) {return new VegasScreenView();},
        {
          name: 'Vegas',
          backgroundColorProperty: new Property( '#fff' ),
          homeScreenIcon: createScreenIcon( 'yellow' )
        }
      ),

      new Screen(
        function() {return {};},
        function( model ) {return new RewardScreenView();},
        {
          name: 'Reward',
          backgroundColorProperty: new Property( '#fff' ),
          homeScreenIcon: createScreenIcon( 'blue' )
        }
      )
    ], simOptions ).start();
  } );
} );
@@ -230,64 +230,8 @@
  );%0A
-  var Rectangle = require( 'SCENERY/nodes/Rectangle' );%0A
   va
@@ -644,254 +644,8 @@
 %7D;%0A%0A
-  // Creates a rectangle filled with a specified color%0A  var createScreenIcon = function( color ) %7B%0A    return new Rectangle( 0, 0, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.height, %7B fill: color %7D );%0A  %7D;%0A%0A
   Si
@@ -779,32 +779,33 @@
 ction( model ) %7B
+ 
 return new Vegas
@@ -813,34 +813,27 @@
 creenView();
+ 
 %7D,
-%0A       
  %7B%0A         
@@ -907,64 +907,8 @@
 fff'
- ),%0A          homeScreenIcon: createScreenIcon( 'yellow'
  )%0A 
@@ -915,22 +915,16 @@
        %7D
-%0A     
  ),%0A%0A   
@@ -998,16 +998,17 @@
 odel ) %7B
+ 
 return n
@@ -1029,26 +1029,19 @@
 nView();
+ 
 %7D,
-%0A       
  %7B%0A     
@@ -1120,62 +1120,8 @@
 fff'
- ),%0A          homeScreenIcon: createScreenIcon( 'blue'
  )%0A 
@@ -1128,22 +1128,16 @@
        %7D
-%0A     
  )%0A    %5D

delete unnecessary custom screen icons, #59