public GamePanel(Game g)
 {
     InitializeComponent();
     this.g = g;
     powerBarRect.Height = Constants.ScreenHeight - 225;
     barHeight = powerBarRect.Height;
     powerBarRect.Margin = new Thickness(0, 5, 0, 0);
     value = 100;
     multi = +1;
 }
        public ShipSelectionState(Game game)
        :base(game)
        {

        }
 public GameState(Game g, int TimeToPlay, int AmountOfShips)
 :base(g)
 {
     this.AmountOfShips = AmountOfShips;
 }
 public State(Game g)
 {
     InitializeComponent();
     game = g;        
 }
 public HelpState(Game g)
     :base(g)
 {
     Init();
 }
        public StoryState(Game game)
        :base(game)
        {

        }
 //Date: 30/04/15 15:00
 //Author: Cédric De Dycker
 #endregion
 private Game SetupGame()
 {
     contentGrid.Background = Constants.GrayTwoBrush;
     if (game != null && game.GetRunningState())
     {
         game.StopGame();
     }
     if (this.loggedInUser is Student)
     {
         game = new Game(this, ((Student)this.loggedInUser).GetQuizScore);
     }
     else
     {
         game = new Game(this, Constants.AdminPlayTime);
     }
     game.VerticalAlignment = System.Windows.VerticalAlignment.Center;
     game.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
     mainContentControl.Content = game;
     game.StartLoop();
     return game;
 }
 public MenuState(Game g)
     :base(g)
 {
     Init();
     cm = new CollisionManager(Constants.ScreenWidth, Constants.ScreenHeight);
 }