Exemple #1
0
        static void Main(string[] args)
        {
            InitialMap initBoard = new InitialMap();
            Positions  boardPos  = new Positions();
            Settings   settings  = new Settings();
            Board      myBoard   = new Board(22, 22, 200, ref settings, ref initBoard, ref boardPos);

            myBoard.Init();
            while (myBoard.m_bIfGameOver == false)
            {
                myBoard.mapBoard();
                myBoard.PrintBoard();
                System.Threading.Thread.Sleep(200);
                if (myBoard.m_bIfGameOver == false)
                {
                    Console.Clear();
                }
                myBoard.simulate();
            }
            myBoard.mapBoard();
            myBoard.PrintBoard();
            Console.WriteLine("Zwycieska druzyna: " + myBoard.winner);
            Console.WriteLine("Wyplata zlodzieja: " + myBoard.m_32ThiefPayment);
            Console.WriteLine("Wyplata policjantow: " + myBoard.m_32CopsPayment);
            Console.Read();
        }
Exemple #2
0
 public Board(short a_16NumOfRows, short a_16NumOfColumns, int a_32MaxNumberOfIterations, ref Settings a_Settings, ref InitialMap a_firsBoard,
              ref Positions a_positions)
 {
     m_16NumOfColumns          = a_16NumOfColumns;
     m_16NumOfRows             = a_16NumOfRows;
     m_32MaxNumberOfIterations = a_32MaxNumberOfIterations;
     m_Settings     = a_Settings;
     firstBoard     = a_firsBoard;
     boardPositions = a_positions;
 }