topical media & game development 
  
 
 
 
 
  
    
    
  
 mobile-game-ch22-hangman-app.js / js
  var twitter = require("ntwitter"),
      fs = require('fs'),
      words = fs.readFileSync('words.txt').toString().split("\n");
  
  var client = new twitter({
    consumer_key: "YOUR_CONSUMER_KEY",
    consumer_secret: "YOUR_CONSUMER_SECRET",
    access_token_key: "YOUR_ACCESS_TOKEN_KEY",
    access_token_secret: "YOUR_ACCESS_TOKEN_SECRET"
  });
      
  var accountName = "hangmanword";
  
  function randomWord() {
    var word;
    do {
      word = words[Math.floor(Math.random()*words.length)];
    } while(!word.match(/^\w+
  
  
(C) Æliens 
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.