Example #1
0
        public static void Main()
        {
            //Open the game window
            SwinGame.OpenGraphicsWindow("GameMain", 800, 800);
            // SwinGame.ShowSwinGameSplashScreen();
            Board board = new Board();

            BoardSetup.SetUpBoard(board);
            BoardSetup.SetupPices(board);


            //Run the game loop
            while (false == SwinGame.WindowCloseRequested())
            {
                //Fetch the next batch of UI interaction
                SwinGame.ProcessEvents();

                //Clear the screen and draw the framerate
                SwinGame.ClearScreen(Color.White);
                SwinGame.DrawFramerate(0, 0);
                //
                // drawing cells on the board
                BoardDrawing.DrawBoard(board);
                BoardDrawing.DrawPieces(board);
                if (SwinGame.MouseClicked(MouseButton.RightButton))
                {
                    board.GetSingleCell.SelectedShapesAt(SwinGame.MousePosition());
                }

                //BoardSetup.SetupPices (board);
                //Draw onto the screen
                SwinGame.RefreshScreen(60);
            }
        }
Example #2
0
        public static void Main()
        {
            //Open the game window
            SwinGame.OpenGraphicsWindow("GameMain", 800, 600);
            // SwinGame.ShowSwinGameSplashScreen();
            BoardDrawing drawing = new BoardDrawing();


            //Run the game loop
            while (false == SwinGame.WindowCloseRequested())
            {
                //Fetch the next batch of UI interaction
                SwinGame.ProcessEvents();

                //Clear the screen and draw the framerate
                SwinGame.ClearScreen(Color.White);

                //drawing.drawYellowShape (0, 120);
                SwinGame.DrawFramerate(0, 0);
                drawing.SetUpBoard(0, 20);
                //Draw onto the screen
                SwinGame.RefreshScreen(60);
            }
        }