public void updatePosition(Snake snake) throws BorderException
	{
		int new_pos;
		
		for(int i=0; i<snake.getBody().size(); i++)
		{
			if(snake.getBody().get(i).getDirection() == Direction.NORTH)
			{
				new_pos = snake.getBody().get(i).getPosY() - snake.getHeight();
				
				if(new_pos < 0)
				{
					throw new BorderException("Perdu!\nVous avez heurté un rebord.");
				}
				else
				{
					snake.getBody().get(i).setPosY(new_pos);
				}
			}
			else if(snake.getBody().get(i).getDirection() == Direction.SOUTH)
			{
				new_pos = snake.getBody().get(i).getPosY() + snake.getHeight();
				
				if(new_pos >= getHeight())
				{
					throw new BorderException("Perdu!\nVous avez heurté un rebord.");
				}
				else
				{
					snake.getBody().get(i).setPosY(new_pos);	
				}
			}
			else if(snake.getBody().get(i).getDirection() == Direction.WEST)
			{
				new_pos = snake.getBody().get(i).getPosX() - snake.getWidth();
				
				if(new_pos < 0)
				{
					throw new BorderException("Perdu!\nVous avez heurté un rebord.");
				}
				else
				{
					snake.getBody().get(i).setPosX(new_pos);
				}
			}
			else if(snake.getBody().get(i).getDirection() == Direction.EAST)
			{
				new_pos = snake.getBody().get(i).getPosX() + snake.getWidth();
			
				if(new_pos >= getWidth())
				{
					throw new BorderException("Perdu!\nVous avez heurté un rebord.");
				}
				else
				{
					snake.getBody().get(i).setPosX(new_pos);
				}
			}
		}
		
		snake.updateDirections();
	}