title: Calling a Lua function from within an object instance
body: <p>I have a Main lua file that creates a scene and within the scene function it creates a Deck object and a function called wonGame() that check to see when the game is won.</p>
  
  <pre><code>local composer = require("composer")
  function scene:create(e)
       require "Deck"
       myDeck = Deck:new()
  
       function wonGame()
           print("You have won the game")
       end
  end 
  </code></pre>
  
  <p>My question - how can I call the wonGame() function from within the Deck class file? For example, say I have a function called checkCondition in Deck class</p>
  
  <pre><code>function checkCondition(e) 
      if(somethingTrue)
           wonGame() --this should be the function in Main file
      end
  end
  </code></pre>