예제 #1
0
 //**********************************METHODS**********************************//
 /// <summary>
 /// Constructor of the world - feel the power
 /// </summary>
 /// <param name="worldHeight">how big is this world</param>
 /// <param name="worldWidth">how big is this world</param>
 /// <param name="isWrappable">is it round(wrappable) or flat</param>
 public GameWorld(int worldHeight, int worldWidth, bool isWrappable)
 {
     LogConsole.WriteLine("GameWorld constructor");
     this.worldHeight = worldHeight;
     this.worldWidth  = worldWidth;
     this.isWrappable = isWrappable;
     world            = new int[this.worldHeight, this.worldWidth];
     age = 0;
 }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            gameEngine = GameEngine.GEInstance;
            gameEngine.InitTheworld(600, 600, 1, true);

            graphicEngine = GraphicEngine.GraphicEngineInstance;

            graphicEngine.setHandler(this);
            LogConsole.WriteLine("przed view");
            graphicEngine.initView();



            graphicEngine.setRootGrid(rootGrid);
            graphicEngine.ShowWorld(rootGrid);



            //IntPtr windowHandle = new WindowInteropHelper(this).Handle;
            //HwndSource source = (HwndSource)HwndSource.FromVisual(this);
            // http://blog.scottlogic.com/2012/04/20/everything-you-wanted-to-know-about-databinding-in-wpf-silverlight-and-wp7-part-two.html
        }
예제 #3
0
        } = 5;                                                         //def probab of beeing alive =)


        //**********************************METHODS**********************************//
        /// <summary>
        /// Default constructor
        /// </summary>
        public PopulatingParams()
        {
            LogConsole.WriteLine("PopulatingParams constructor");
            aliveProbability = 50;
        }
예제 #4
0
 /*private constructor initiates the board for game*/
 private GameEngine()
 {
     LogConsole.WriteLine("Game engine constructor");
 }