In this chapter, you learned to write your own functions. You then saw how to accept and return values in your functions. You learned about namespaces and saw how global variables can be accessed and changed from within functions. You also learned to limit your use of global variables, but saw how to use global constants when necessary. You even dabbled ever so slightly in some artificial intelligence concepts to create a computer opponent in a game of strategy.