Example #1
0
    def __init_obs(self):
        count=121

        if self.__rando % 20:
            self.__check_col+=1


        if self.__rando % count == 0:
            
            self.__objectList.append(magnet())
            self.__magyo+=1
            self.__mag = self.__objectList[-1]
            self.__flag=1

        if self.__rando % (count+51) == 0:
            self.__objectList.append(speed_boost())
            self.__flag=2

        count%=251
        count+=1
        
        if self.__rando % 5 == 0:
            self.__objectList.append(coins())
            self.__flag=3
            
        if self.__rando % 12 == 0:
            self.__objectList.append(beam())
            self.__flag=4
Example #2
0
def make_coins_for_given_xy(x,y):
	columns=5
	rows=2
	for i in range (0,columns):
		for j in range (0,rows):
			temp=coins(x+i,y+j,1,1)
			grid.copy_coins_on_board(temp) ###copying coins on board
			new=[x+i,y+j,1] ##1 is the flag that coin is present
			coin_list.append(new)
Example #3
0
 def __introduceObstacles(self):
     if self.__frameCount < self.__obstaclesAllowed:
         if self.__frameCount % 200 == 0:
             self.__objectList.append(magnet())
             self.__availableMagnet = self.__objectList[-1]
         elif self.__frameCount % 20 == 0:
             self.__objectList.append(bars())
         elif self.__frameCount % 130 == 0:
             self.__objectList.append(speedBoost())
         elif self.__frameCount % 10 == 0:
             self.__objectList.append(coins())
     elif self.__frameCount > self.__dragonAppearance and not self.__dragonActivated:
         self.__dragonActivated = True
         x,y = self.__objectList[0].getXY()
         ux,uy = self.__objectList[0].getXYspeed()
         self.__objectList.append(Dragon(y,uy))
         self.__dragon = self.__objectList[-1]
     elif self.__dragonActivated and self.__frameCount % 10 ==0:
         x,y = self.__dragon.getMouth()
         self.__objectList.append(iceBalls(x,y))
Example #4
0
    #obstacles_obj1=obstacles(x2,i)
    if (r2 == 1):
        obstacles_obj1 = obstacle1(x2, i, screen, obs1, obs2)
        obstacles_obj1.createobstacle(screen, obs1, obs2)
    if (r2 == 2):
        obstacles_obj1 = obstacle2(x2, i, screen, obs1, obs2)
        obstacles_obj1.createobstacle(screen, obs1, obs2)
    if (r2 == 3):
        obstacles_obj1 = obstacle3(x2, i, screen, obs1, obs2)
        obstacles_obj1.createobstacle(screen, obs1, obs2)

    #obstacles_obj2=obstacles(x1,j)

    if (r3 == 1):
        obstacles_obj2 = coins(x3, j, screen, obs1, obs2)
        obstacles_obj2.createcoins1(screen, obs1, obs2)
    if (r3 == 2):
        obstacles_obj2 = coins(x3, j, screen, obs1, obs2)
        obstacles_obj2.createcoins2(screen, obs1, obs2)
    if (r3 == 3):
        obstacles_obj2 = coins(x3, j, screen, obs1, obs2)
        obstacles_obj2.createcoins3(screen, obs1, obs2)
    if (r3 == 4):
        obstacles_obj2 = coins(x3, j, screen, obs1, obs2)
        obstacles_obj2.createcoins4(screen, obs1, obs2)
    if (r3 == 1):
        obstacles_obj2 = coins(x4, j, screen, obs1, obs2)
        obstacles_obj2.createcoins1(screen, obs1, obs2)
    if (r3 == 2):
        obstacles_obj2 = coins(x4, j, screen, obs1, obs2)