public CollectResources(MapItem[,] gridE ,Player[] playersE,int my_idE,int player_countE,SearchMethods searchMethods)
 {
     SearchMethods = searchMethods;
     this.grid =gridE ;
     coin_queue=new List<Coin>();
     health_pack_queue=new List<HealthPack>();
     players = playersE;
     myid = my_idE;
     player_count = player_countE;
 }
Beispiel #2
0
        private int player_count; //Number of players in the game (from countable numbers)

        #endregion Fields

        #region Constructors

        public Map()
        {
            grid = new MapItem[10, 10];
            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 10; j++)
                {
                    grid[i, j] = new EmptyCell();
                }
            }
            players = new Player[5];
            SearchMethods search_methods = new SearchMethods(grid, players, myid, player_count);
            collect_resources = new CollectResources(grid,players,myid,player_count,search_methods);
            search_methods.clearMapForBFS();
            com = Communicator.getInstance();
            com.setMap(this);
            com.StartListening();
            map_string = "";
            playingMethod = 0;
        }