Beispiel #1
0
 def dispatchGoalRequest(self, req):
     if req.operation == 1:
         out = self.pushGoal(goal.Goal(req.position))
     elif req.operation == 2:
         out = self.popGoal(index = req.index)
     elif req.operation == 3:
         out = self.updateGoal(req.index, goal.Goal(req.position))
     else:
         out = 0
     return GoalResponse(out)
Beispiel #2
0
def init_goal():

    goalOne = goal.Goal("Horse Riding1", 9)

    goalOne.update(1, "rode a pony", ["a", "b", "c", "d", "e"])
    goalOne.update(1, "it kicked me", ["aa", "bb", "cc", "dd", "ee"])

    goalOne.save()
    print(goalOne.rec[0].time.month)
    print(goalOne.rec[0].survey)

    goalTwo = goal.Goal("Horse Riding1", 9)
    goalTwo.load()
    print(goalTwo.rec[0].time)
    print(goalTwo.rec[0].survey)
Beispiel #3
0
def aStarPlanner():

    g = goal.Goal()
    p = planner.aStarPlanner()

    global listOfActions
    global step

    if actions.actionsInit.goalAchieved == True:
        actions.actionsInit.goalAchieved = False
        listOfActions = []
        robotGoal = g.findGoal()
        g.updateWorldModel()

        if goal == "idle":
            return
        else:
            p.planner(robotGoal)
            step = p.step
            i = 0
            for index in range(len(p.actions)):
                listOfActions.append(p.actions[(p.step - 1) - i])
                i += 1

    count = 0
    for index in range(len(listOfActions)):
        print str((count) + 1) + ": " + listOfActions[count]
        count += 1

    if actions.actionsInit.goalAchieved == False:
        finiteStateMachine()
def test_load_two():
    obj = goal.Goal("Horse Riding2", 9)
    obj.load("Horse Riding2")
    print("TEST: load progress\n", obj.prog_rec)
    print("TEST: load timestamps\n", obj.time_rec)
    print("TEST: load notes list\n", obj.note_rec)
    print("TEST: progress --->", obj.progress)
    print()
def init_goal():
    goalOne = goal.Goal("Horse Riding1", 9)
    goalOne.progress = 1
    goalOne.time_rec = ['2020-02-10']
    goalOne.prog_rec = [0]
    goalOne.note_rec = ['goal created']

    goalOne.save("Horse Riding1")
Beispiel #6
0
def read_goal():

    test = goal.Goal("testGoal", 10)

    test.load("files/testGoal.csv")
    for t in test.rec:
        print(t.time)
        print(t.progress)
        print(t.note)
Beispiel #7
0
 def create_goal(self, node_id: str, cost=1) -> goal.Goal:
     """
     Adds goal node to graph
     :param node_id: Goal node id
     :param cost: Goal cost
     :return: Goal node
     """
     g = goal.Goal(node_id, cost)
     self._goals_dict[node_id] = g
     return g
def prog_one():
    goalOne = goal.Goal("Horse Riding2", 9)
    goalOne.progress = 3
    goalOne.time_rec = ['2020-02-10', '2020-02-20', '2020-02-24', '2020-02-27']
    goalOne.prog_rec = [0, 1, 2, 3]
    goalOne.note_rec = [
        'goal created', 'groomed the horse', 'saddled the horse',
        'horse jumping'
    ]
    goalOne.save("Horse Riding2")
Beispiel #9
0
	def drawGoals(self, screen):
		#this draws the goals
		#TODO: ADD A BOOL TO SWITCH FROM MOVING AND STILL GOALS
		#the goal's width should fill 3/5ths of half the screen and height should be 1/5th of the screen
		goalWidth = self.height*.1
		goalHeight = self.width*.2
		xRight = self.goalWidth2//2
		yRight = self.height//2
		
		xLeft = self.width - self.goalWidth2//2
		yLeft = self.height//2
		if(self.moving):
			right = goal.MovingGoal(self.goalWidth, self.goalHeight, xRight,yRight, 2)
			left = goal.MovingGoal(self.goalWidth2, self.goalHeight2, xLeft,yLeft, 2)
		else:
			right = goal.Goal(self.goalWidth, self.goalHeight, xRight,yRight)
			left = goal.Goal(self.goalWidth2, self.goalHeight2, xLeft,yLeft)
			
		self.goals.add(right)
		self.goals.add(left)
Beispiel #10
0
    def __init__(self, app):
        self.app = app

        self.player = player.Player(self.app)
        self.app.renderer.scene.add(self.player.graphics.canvas)

        self.terrain = None

        self.goal = goal.Goal(self.app)
        self.app.renderer.scene.add(self.goal.canvas)

        self.game_objects = set()
        self.vehicles = set()
        self.enemies = set()

        self.net_players = {}
def prog_two():
    goalOne = goal.Goal("Horse Riding3", 9)
    goalOne.progress = 5

    for i in range(goalOne.progress):
        goalOne.rec.append(
            Node(i,
                 date.today() - timedelta(days=i * 3), "note number" + str(i)))


#    goalOne.time_rec = ['2020-02-10','2020-02-20','2020-02-24','2020-02-27','2020-03-2','2020-03-5']
#    goalOne.prog_rec = [0,1,2,3,4,5]
#    goalOne.note_rec = ['goal created now lets see how the txt is formatted on screen','groomed the horse','saddled the horse','horse jumping','Replaced horse shoe','Beach riding']

#graph.build_graph(goalOne)
    goalOne.save("Horse Riding3")
Beispiel #12
0
 def add_goal(self):
     '''
     Creates a new goal object and adds it to the goal list.
     Saves the new goal list to the save file.
     Updates the listbox display.
     '''
     newgoal = simpledialog.askstring("Input", "What goal would you like to begin tracking?", parent=self.root)
     # if nothing is entered then do nothing else
     if newgoal:
         goalamt = simpledialog.askinteger("Input", "What is your end goal amount?", parent=self.root, minvalue=1, maxvalue=1000000)
         # if no amount is entered default to 1
         if goalamt is None:
             goalamt = 1
         self.goal_list.goals.append(goal.Goal(newgoal,goalamt,0)) # add goal to goal list
         self.goal_list.goals[-1].update(0, "Goal Created")
         self.goal_list.save() # updates save data
         self.set_listbox() # updates listbox display
         print(self.goal_list)
Beispiel #13
0
    def setGoal(self, newGoal):
        """
        Put a goal on the stack.  If there is already a goal in progress,
        replace it.  Use this to receive messages sent as Pt() objects.
        """
        assert isinstance(newGoal, Pt), "Must be Pt object: %s" % ` newGoal `

        if self.gs.top():
            # Pop the goal from the stack
            oldGoal = self.gs.pop()

            # Remove the corresponding force from the force list.
            self.fl.removeForce(oldGoal.goalPtr)

        g = goal.Goal(newGoal.point)

        print "adding goal: ", g.str()
        print "  ==> we are here just now: (%.3f, %.3f, %.3f)" % tuple(
            self.position)
        self.pushGoal(g)
Beispiel #14
0
# Main Program
#
#####################


# create an empty maze (with just perimeter walls):
# ------------------------------------
columns = 11   # should be an odd number!
rows = 9      # should be an odd number!
maze = maze.Maze(columns, rows)     # size of maze (columns, rows)
block_maze_perimeter(maze)         # draw the surrounding walls around the maze

# Create the goal:
# ----------------
# The default position in the lower right corner of the maze, inside the maze (hence -1):
goal = goal.Goal(maze, columns - 1, rows - 1, "gold")    # (maze, column, row, color)

# Create a maze walker:
# ---------------------
# The position should be top-right, inside the maze (hence 2,2) 
walker = walker.Walker(maze, 2, 2, 0, "blue")     # (maze, column, row, heading, color)
maze.update_display()     # don't change this line. for display acceleration.



# Create the maze walls:
#-----------------------
# the maze starts at (1, 1): top-left corner
maze_start_column = 1
maze_start_row = 1
Beispiel #15
0
def game():
    data = {}
    try:
        data = pickle.load(open("data","rb"))
    except:
        pass
    print(data)
    # This is to make sure that the score of the player is remembered
    name = input("Whats your name? ")
    screen = pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT))
    clock = pygame.time.Clock()
    p = player.Player()
    enemies= pygame.sprite.Group()
    enemies.add(Wander(p))
    g = goal.Goal(p)
    score = 0
    scoreFont = pygame.font.SysFont("Arial",24)
    gameOver = False
    gameOverFont = pygame.font.SysFont("Arial", 100)
    playing = True
    # This is creating the start of the game
    while playing:
        if gameOver == True:
            for e in pygame.event.get():
                if e.type == pygame.QUIT:
                    return
                if e.type == pygame.KEYDOWN:
                    if e.key == pygame.K_e:
                        playing = False
                    if e.key == pygame.K_r:
                        gameOver = False
                        enemies = pygame.sprite.Group()
        # These are the keys for what happens after the game is over.
            screen.fill((255,0,0))
            gameOverText = gameOverFont.render("Game Over", False, (0,0,0))
            screen.blit(gameOverText, (300,200))
            restart = gameOverFont.render( " Press r to restart", False, (0,0,0))
            screen.blit(restart, (300, 300))
            exit = gameOverFont.render( " Press e to exit", False, (0,0,0))
            screen.blit(exit, (300,400))
            #These are the text that are going to display at the end of the game
            offset = 0
            scores = []
            for n in data:
                scores.append([data[n],n])
            scores = sorted(scores)
            for s in scores:
                score = scoreFont.render( s[1] + " - "+ str(s[0]),False, (0,255,0) )
                screen.blit(score, (10,10+offset))
                offset+=25

            pygame.display.update()
            continue
        for e in pygame.event.get():
            if e.type == pygame.QUIT:
                return
            if e.type == pygame.KEYDOWN:
                if e.key == pygame.K_LEFT:
                    p.speedx = -PLAYER_SPEED
                if e.key == pygame.K_RIGHT:
                    p.speedx = PLAYER_SPEED
                if e.key == pygame.K_DOWN:
                    p.speedy = PLAYER_SPEED
                if e.key == pygame.K_UP:
                    p.speedy = -PLAYER_SPEED
                    #This code controls how the player moves.
            if e.type == pygame.KEYUP:
                if e.key == pygame.K_LEFT and p.speedx == -PLAYER_SPEED:
                    p.speedx= 0
                if e.key == pygame.K_RIGHT and p.speedx == PLAYER_SPEED:
                    p.speedx = 0
                if e.key == pygame.K_DOWN and p.speedy  == PLAYER_SPEED:
                    p.speedy = 0
                if e.key == pygame.K_UP and p.speedy == -PLAYER_SPEED:
                    p.speedy = 0
                    #This code is to make sure that the player does not run  out of the screen.
        screen.fill(BACKGROUND_COLOR)
        #update
        p.update()
        for e in enemies:
            e.update(p)
            screen.blit(e.image,(e.rect.x,e.rect.y))
        #collisions
        if pygame.sprite.spritecollideany(p,enemies):
            gameOver = True
            if name not in data:
                data[name] = score
            elif data[name] < score:
                data[name]=score
            pickle.dump(data,open("data","wb"))
        if g.rect.contains(p.rect):
            score +=1
            g = goal.Goal(p)
            r = random.uniform(0,1)
            if r < WANDER_CHANCE:
                enemies.add(Wander(p))
            elif r < SNAKE_CHANCE:
                enemies.add(Snake(p))
            elif r < HOMING_CHANCE:
                enemies.add(Homing(p))
        #This code is responsible for which enemies form every point you earn.


        text = scoreFont.render("score: " + str(score), False, (255, 255, 255))
        screen.blit(text,(10,10))
        screen.blit(g.image, (g.rect.x, g.rect.y))
        screen.blit(p.image, (p.rect.x, p.rect.y))
        pygame.display.update()
        clock.tick(50)
Beispiel #16
0
# Main Program
#
#####################


# create the maze:
# ----------------
columns = 6
rows = 6
maze = maze.Maze(columns, rows)      # size of maze (columns, rows)

# Create the goal (you can move it around the maze, if you'd like):
# -----------------------------------------------------------------
goal_column = randint(1, maze.get_columns())
goal_row = randint(1, maze.get_rows())
goal = goal.Goal(maze, goal_column, goal_row, "gold")    # (maze, column, row, color)

# Create a maze walker (you can assume that the walker starts at the top left corner (1, 1):
# ------------------------------------------------------------------------------------------
walker = walker.Walker(maze, 1, 1, 0, "blue")     # (maze, column, row, heading, color)

# Placing blocking walls/tiles in the maze:
# -----------------------------------------
# When putting walls and bridges in the maze, don't put them on the goal and the walker:
excluded_blocks = [ [goal.get_column(), goal.get_row()], [walker.get_column(), walker.get_row()] ]


# For testing/debugging purposes:
# Block specific tiles in a 6-by-6 maze:
'''
maze.block_square(1, 2, "wall")
def test_load_three():
    obj = goal.Goal("Horse Riding3", 9)
    obj.load("Horse Riding3")
    graph.build_graph(obj)
    print()
Beispiel #18
0
 def init_goal(self, soup):
     goal_point = soup.find('goal_point')
     goal_x = float(goal_point.x.get_text())
     goal_y = float(goal_point.y.get_text())
     self.goal = goal.Goal(goal_x, goal_y)
import game

SOUTH = grid.SOUTH
EAST = grid.EAST
NORTH = grid.NORTH    
WEST = grid.WEST

table =[[9, 8, 8, 8, 10, 12],
            [1, 0, 2, 4,  9, 6],
            [3, 0, 8, 0,  0, 12],
            [9, 0, 0, 0,  0, 4],
            [1, 4, 1, 0, 6, 5],
            [7, 3, 2, 2, 10, 6]]


test_grid = grid.Grid(table)
r0 = robot.Robot((3,0),0)
r1 = robot.Robot((4,4),1)
robots=[r0,r1]
goal = goal.Goal(r0 ,(1,1))

jeutest=game.Game(test_grid,robots,goal)

print(robots)
r0.move(NORTH)

print(robots)
r1.move(SOUTH)
print(jeutest.robots)

Beispiel #20
0
    def initNiveau(self, niveau):
        self.les_sprites.empty()
        self.plateformes.empty()
        self.pieges.empty()
        self.check.empty()
        self.goals = pygame.sprite.Group()
        self.plateformegGravite = pygame.sprite.Group()

        #MISE EN PLACE DU NOMBRE DE POINTS
        pts = self.niveau
        stringpts = "Points : " + str(self.niveau)
        self.pts = texte.Texte(self, stringpts, LARGEURFENETRE - 150, 0, 150)

        if niveau == 1:  #VRAI NIVEAU 1
            background.Background(self, "images/backgrounds/background_1.png")
            for plate in [(0, 728), (150, 650), (700, 300), (900, 300)]:
                plat.Plat(self, *plate)

            for piegee in []:
                piege.Piege(self, *piegee)

            for gravv in [(300, 500), (300, 400), (300, 300), (400, 500),
                          (400, 400), (400, 300)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 80, 618)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(950, 250)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 700)

        elif niveau == 2:  #VRAI NIVEAU 2
            background.Background(self, "images/backgrounds/background_1.png")
            for plate in [(0, 150)]:
                plat.Plat(self, *plate)

            for piegee in [(0, 600)]:
                piege.Piege(self, *piegee)

            for gravv in [(300, 500), (300, 400), (300, 300), (400, 500),
                          (400, 400), (400, 300)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 0, 40)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(600, 718)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 150)

        elif niveau == 3:  #VRAI LEVEL 3
            background.Background(self, "images/backgrounds/background_2.jpg")

            for plate in [(5, 700), (388, 700), (650, 580), (520, 450),
                          (5, 100), (120, 450)]:
                plat.Plat(self, *plate)

            for piegee in []:
                piege.Piege(self, *piegee)

            for gravv in [(220, 350), (120, 250)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 50, 590)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(0, 0)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(20, 620)

        elif niveau == 4:  #VRAI NIVEAU 4
            background.Background(self, "images/backgrounds/background_2.jpg")

            for plate in [(900, 80), (725, 600), (240, 600), (946, 600, 6),
                          (805, 0, 4), (805, 100, 4), (805, 200, 4),
                          (805, 300, 4), (805, 364, 4), (805, 600, 4)]:
                plat.Plat(self, *plate)

            for piegee in [(835, 0, 3), (835, 100, 3), (835, 200, 3),
                           (835, 300, 3), (835, 364, 3), (835, 600, 3),
                           (946, 630), (0, -60, 4), (100, -60, 4),
                           (200, -60, 4), (300, -60, 4), (400, -60, 4),
                           (500, -60, 4), (600, -60, 4), (700, -60, 4),
                           (800, -60, 4), (900, -60, 4)]:
                piege.Piege(self, *piegee)

            for gravv in [(850, 500), (850, 600), (850, 250), (560, 500),
                          (120, 500), (120, 600), (120, 400), (120, 300)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 940, -35)
            for checkk in [(760, 490)]:
                checkpoint.Check(self, *checkk)

            for finniv in [(155, 0)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(950, 50)

        elif niveau == 5:  #VRAI NIVEAU 5

            background.Background(self, "images/backgrounds/background_1.png")

            for plate in [(0, 728), (310, 550, 2), (460, 450, 2),
                          (610, 350, 2), (760, 250, 2)]:
                plat.Plat(self, *plate)

            for piegee in [(300, 550, 2), (450, 450, 2), (600, 350, 2),
                           (750, 250, 2)]:
                piege.Piege(self, *piegee)

            for gravv in [(200, 550), (350, 450), (500, 350), (650, 250)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 10, 620)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(800, 250)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 700)

        elif niveau == 6:  # VRAI LEVEL 6
            background.Background(self, "images/backgrounds/background_1.png")

            for plate in [(20, 120, 6), (455, 680, 6), (490, 0, 4),
                          (490, 100, 4), (490, 200, 4), (490, 300, 4),
                          (490, 400, 4), (490, 455, 4)]:
                plat.Plat(self, *plate)

            for piegee in [(0, -60, 4), (100, -60, 4), (200, -60, 4),
                           (300, -60, 4), (400, -60, 4), (500, -60, 4),
                           (600, -60, 4), (700, -60, 4), (800, -60, 4),
                           (900, -60, 4), (480, 0, 2), (480, 100, 2),
                           (480, 200, 2), (480, 300, 2), (480, 400, 2),
                           (480, 455, 2), (520, 0, 3), (520, 100, 3),
                           (520, 200, 3), (520, 300, 3), (520, 400, 3),
                           (520, 455, 3)]:
                piege.Piege(self, *piegee)

            for gravv in [(210, 200), (210, 300), (210, 400), (210, 500),
                          (210, 600), (210, 100)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 60, 0)
            for checkk in [(530, 560)]:
                checkpoint.Check(self, *checkk)

            for finniv in [(950, 250)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(60, 100)

        elif niveau == 7:  #VRAI NIVEAU 7
            background.Background(self, "images/backgrounds/background_1.png")
            for plate in [
                (0, 150),
                (210, 0, 2),
                (210, 100, 2),
                (210, 200, 2),
                (210, 500, 2),
                (210, 600, 2),
                (210, 700, 2)  #,(210,300,2)
                    ,
                (450, 700, 1)
            ]:
                plat.Plat(self, *plate)

            for piegee in [(200, 0, 2), (200, 100, 2), (200, 200, 2),
                           (200, 500, 2), (200, 600, 2),
                           (200, 700, 2)]:  #,(200,300,2)
                piege.Piege(self, *piegee)

            for gravv in [(100, 150), (100, 250), (100, 350), (100, 450),
                          (100, 550), (100, 650)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 10, 40)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(500, 650)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 20)

        elif niveau == 8:  #VRAI NIVEAU 8

            background.Background(self, "images/backgrounds/background_1.png")

            for plate in [(0, 150), (0, 410), (100, 410),
                          (200, 410), (300, 410), (400, 410), (500, 410),
                          (600, 410), (600, 600), (0, 410), (100, 410),
                          (200, 410), (300, 410), (400, 410), (500, 410),
                          (600, 410), (600, 600), (0, 440, 3), (100, 440, 3),
                          (200, 440, 3), (300, 440, 3), (400, 440, 3),
                          (500, 440, 3), (600, 440, 3)]:
                plat.Plat(self, *plate)

            for piegee in [(0, 400, 4), (100, 400, 4), (200, 400, 4),
                           (300, 400, 4), (400, 400, 4), (500, 400, 4),
                           (600, 400, 4), (0, 470, 1), (100, 470, 1),
                           (200, 470, 1), (300, 470, 1), (400, 470, 1),
                           (500, 470, 1), (600, 470, 1)]:
                piege.Piege(self, *piegee)

            for gravv in [(300, 100), (500, 200), (700, 300), (700, 400),
                          (700, 500), (500, 550), (400, 550), (300, 550),
                          (200, 550), (100, 550)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 0, 40)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(30, 700)]:

                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 150)

        elif niveau == 9:  #VRAI LEVEL 9
            background.Background(self, "images/backgrounds/background_1.png")

            for plate in [(20, 120), (220, 0, 2), (220, 100, 2), (220, 200, 2),
                          (120, 300), (170, 450), (370, 320), (478, 200, 2),
                          (545, 0, 2), (10, 450)]:
                plat.Plat(self, *plate)

            for piegee in [(0, 757, 4), (100, 757, 4), (200, 757, 4),
                           (300, 757, 4), (400, 757, 4), (500, 757, 4),
                           (600, 757, 4), (700, 757, 4), (800, 757, 4),
                           (900, 757, 4), (210, 0, 2), (210, 100, 2),
                           (210, 200, 2), (120, 290, 4), (10, 440, 4),
                           (0, -60, 4), (100, -60, 4), (200, -60, 4),
                           (300, -60, 4), (400, -60, 4), (500, -60, 4),
                           (600, -60, 4), (700, -60, 4), (800, -60, 4),
                           (900, -60, 4), (535, 0, 2), (470, 200, 2)]:
                piege.Piege(self, *piegee)

            for gravv in [(10, 180), (10, 280), (270, 65), (300, -35),
                          (400, -35), (540, 120)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 60, 0)
            for checkk in [(410, 205)]:
                checkpoint.Check(self, *checkk)

            for finniv in [(950, 250)]:
                goal.Goal(self, *finniv)
            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(60, 100)

        elif niveau == 10:
            background.Background(self, "images/backgrounds/background_2.jpg")
            for plate in [(0, 150)]:
                plat.Plat(self, *plate)

            #pieges vers la droite descente
            for piegee in [(100, 170, 3), (100, 270, 3), (100, 370, 3),
                           (100, 470, 3), (100, 570, 3), (100, 625, 3)]:
                piege.Piege(self, *piegee)

            #piege vers la gauche descente
            for piegee in [(185, -30, 2), (185, 70, 2), (185, 170, 2),
                           (185, 270, 2), (185, 370, 2), (185, 470, 2)]:
                piege.Piege(self, *piegee)

            #piege vers le bas ligne droite
            for piegee in [(190, 580, 1), (290, 580, 1), (390, 580, 1),
                           (490, 580, 1), (590, 580, 1), (670, 580, 1)]:
                piege.Piege(self, *piegee)

            #piege vers le haut ligne droite
            for piegee in [(100, 730, 4), (200, 730, 4), (300, 730, 4),
                           (400, 730, 4), (500, 730, 4), (600, 730, 4),
                           (700, 730, 4), (770, 730, 4)]:
                piege.Piege(self, *piegee)

            #piege vers la gauche montée
            for piegee in [
                (868, 630, 2),
                (868, 530, 2),
                (868, 430, 2),
                (868, 330, 2),
                (868, 230, 2),
            ]:
                piege.Piege(self, *piegee)

            #pieges vers la droite montée
            for piegee in [
                (770, 470, 3),
                (770, 400, 3),
                (770, 370, 3),
            ]:
                piege.Piege(self, *piegee)

            #piege vers le bas petite ligne droite
            for piegee in [
                (768, 230, 1),
                (668, 230, 1),
                (568, 230, 1),
            ]:
                piege.Piege(self, *piegee)

            #piege vers le haut petite ligne droite
            for piegee in [(670, 370, 4), (570, 370, 4)]:
                piege.Piege(self, *piegee)

            #plateformes descente gauche
            for plate in [(70, 150, 2), (70, 250, 2), (70, 350, 2),
                          (70, 450, 2), (70, 550, 2), (70, 650, 2)]:
                plat.Plat(self, *plate)

            #plateformes descente droite
            for plate in [(195, -30, 2), (195, 70, 2), (195, 170, 2),
                          (195, 270, 2), (195, 370, 2), (195, 470, 2)]:
                plat.Plat(self, *plate)

            #plateformes ligne droite haut
            for plate in [
                (200, 550, 3),
                (300, 550, 3),
                (400, 550, 3),
                (500, 550, 3),
                (600, 550, 3),
                (670, 550, 3),
            ]:
                plat.Plat(self, *plate)

            #plateformes ligne droite bas
            for plate in [(100, 740), (200, 740), (300, 740), (400, 740),
                          (500, 740), (600, 740), (700, 740), (800, 740)]:
                plat.Plat(self, *plate)

            #plateformes montée droite
            for plate in [(878, 640, 2), (878, 540, 2), (878, 440, 2),
                          (878, 340, 2), (878, 240, 2), (878, 220, 2)]:
                plat.Plat(self, *plate)

            #plateformes montée gauche
            for plate in [(740, 470, 2), (740, 380, 2)]:
                plat.Plat(self, *plate)

            #le reste des plateformes osef de les décrire de toute façon personne lit ça
            for plate in [(670, 380), (570, 380), (768, 200, 3), (668, 200, 3),
                          (568, 200, 3)]:
                plat.Plat(self, *plate)

            for gravv in [(100, 150), (100, 246), (100, 342), (100, 438),
                          (100, 534), (100, 630), (196, 630), (292, 630),
                          (388, 630), (484, 630), (580, 630), (676, 630),
                          (772, 630), (772, 534), (772, 438), (772, 342),
                          (772, 246), (676, 246), (580, 246)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 0, 40)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(400, 500)]:
                goal.Goal(self, *finniv)

            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 20)

        elif niveau == 11:

            background.Background(self, "images/backgrounds/background_1.png")

            for plate in [(0, 750), (950, 750)]:
                plat.Plat(self, *plate)

            for gravv in [(-46, 114), (-46, 210), (-46, 306), (-46, 402),
                          (-46, 498), (50, 114), (146, 114), (50, 306),
                          (50, 500), (144, 500), (288, 114), (288, 302),
                          (288, 396), (288, 490), (288, 208), (384, 208),
                          (432, 304), (480, 400), (576, 496), (576, 400),
                          (576, 304), (576, 208), (576, 112), (720, 112),
                          (720, 208), (720, 304), (720, 400), (720, 496),
                          (816, 112), (816, 496), (912, 208), (912, 400),
                          (960, 304)]:
                plateformeAntiGrav.PlateformeAntiGrav(self, *gravv)

            self.checkpointCourant = checkpoint.Check(self, 0, 650)
            for checkk in []:
                checkpoint.Check(self, *checkk)

            for finniv in [(950, 700)]:
                goal.Goal(self, *finniv)

            self.joueur = perso.Perso(self)
            self.joueur.pos = vec(40, 20)