Skip to content

Commit

Permalink
simplified game class name to make everything moar ez
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Hufsky committed Apr 19, 2008
1 parent 93a471d commit 15187c5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion olympics/olympics.rb
Expand Up @@ -5,7 +5,7 @@ module Z
end end




class OlympicsGame < Game class Olympics < Game
resolution [160*4, 100*4] resolution [160*4, 100*4]


def setup def setup
Expand Down
3 changes: 1 addition & 2 deletions play.rb
Expand Up @@ -23,8 +23,7 @@
println "no game #{$game_name} found" and exit unless $game_name.is_folder? println "no game #{$game_name} found" and exit unless $game_name.is_folder?


# PLAY! # PLAY!
class_name = "#{$game_name.capitalize}_game" $game_class = $game_name.classify.instantiate rescue quit("Your game class needs to be called #{class_name}")
$game_class = class_name.instantiate rescue quit("Your game class needs to be called #{class_name}")


begin begin
$game_class.run $game_class.run
Expand Down
2 changes: 1 addition & 1 deletion shufflepuit_cafe/shufflepuit_cafe.rb
@@ -1,7 +1,7 @@
# http://en.wikipedia.org/wiki/Shufflepuck_Cafe # http://en.wikipedia.org/wiki/Shufflepuck_Cafe
# thx http://youtube.com/watch?v=9pUmfxM9h54 # thx http://youtube.com/watch?v=9pUmfxM9h54


class ShufflepuitCafeGame < Game class ShufflepuitCafe < Game
def setup def setup
@objects << Ball.new @objects << Ball.new
end end
Expand Down
2 changes: 1 addition & 1 deletion spaceinvaders/spaceinvaders.rb
Expand Up @@ -2,7 +2,7 @@
# cc oneup # cc oneup
# thx kingpepe # thx kingpepe


class SpaceinvadersGame < Game class Spaceinvaders < Game
attr_accessor :player attr_accessor :player


def setup def setup
Expand Down

0 comments on commit 15187c5

Please sign in to comment.