Firstmate commented on a Page, Pong 1.0  -  Jan 25, 2009

You can clean up some of the code. for example change:

alias endgame2 {
  .timerpong off
  set %gameover 1
  drawtext @pong 0 Algerian 150 195 200 Game Over
  drawtext @pong 9 Tahoma 50 330 410 Left wins! Score: $calc(%points * %speed)
  drawtext @pong 0 Algerian 30 300 470 Press spacebar to restart, or Q to quit.
  halt
}
alias endgame1 {
  .timerpong off
  set %gameover 1
  drawtext @pong 0 Algerian 150 195 200 Game Over
  drawtext @pong 4 Tahoma 50 330 410 Right wins! Score: $calc(%points * %speed)
  drawtext @pong 0 Algerian 30 300 470 Press spacebar to restart, or Q to quit.
  halt
}

TO:

alias endgame {
  .timerpong off
  set %gameover 1
  drawtext @pong 0 Algerian 150 195 200 Game Over
  drawtext @pong 9 Tahoma 50 330 410 $1 wins! Score: $calc(%points * %speed)
  drawtext @pong 0 Algerian 30 300 470 Press spacebar to restart, or Q to quit.
  halt
}

And then just type /endgame [left/right]
Instead of putting a separate alias for both.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.