public Game() { InitializeComponent(); client = new GameClient(this); GameObject.LoadGraphic(); //Loadin images InitMap(); //Initialize Map arena = new Arena(ref map); //Pass Graphical map as a reference }
public Arena(ref Hashtable map) { //Get the hashed pictureboxes by reference obj_map = new GameObject[Arena.size, Arena.size]; this.map = map; Arena.arena = this; for(int i=0; i< Arena.size; i++) { for(int j=0; j< Arena.size; j++) { obj_map[i,j] = new Floor(i,j); } } }