fixed bug in player joined, and add randomness to map generation