OTFirstClass

Members
  • Content Count

    3
  • Joined

  • Last visited

About OTFirstClass

  • Rank
    Newbie

Contact Methods

  • Twitter
    OTFirstClass
  1. Yes, I know this, but this is nice and short and exactly all I need. If only I could do a reset, I would be happy.
  2. I recently saw this post on Twitter about this tetris game in javascript in 36 lines of code. I want to use this code but am having problems picking it apart. It is working just fine, but I cannot figure out how to restart the game and go back to the default values after a game ends. The code is at http://jsfiddle.net/ova777/kFxja/ What I have done very simply is to wrap the code in a function startApp() and added a button in the html code that will start the game when clicked. What I want to do is after the game finishes, reset things and restart the game. I do not want to do this via a refresh, but rather set things back to the default. Any help would be greatly appreciated. I have attached my source as well (I have added some CSS styling of my own) Tetris.zip
  3. I love this code and I have been trying to pick it apart. I can't figure out how to restart the game after it ends though. I don't want to refresh the browser so I want to put a button in that will reset everything and start again. Any tips on how to do this? Whenever I try, the objects move two spaces instead of 1 and the speed never resets back to 500