Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class
- APPLICATION
- create
- make
- feature
- make
- -- Launch the application.
- local
- count : INTEGER
- game: GAME
- wi: INTEGER
- do
- from
- count := {GAME}.Min_player_count - 1
- until
- {GAME}.Min_player_count <= count and count <= {GAME}.Max_player_count
- loop
- print ("Enter number of players between " + {GAME}.Min_player_count.out + " and " + {GAME}.Max_player_count.out + ": ")
- io.read_integer
- count := io.last_integer
- end
- create game.make (count)
- game.play
- print ("%NAnd the winner(s) is/are:%N" + "%N")
- from
- wi := 1
- until
- wi > game.winners.count
- loop
- if game.winners[wi] /= void then
- print (" " + game.winners [wi].out + "%N")
- end
- wi := wi + 1
- end
- print ("%N**** GAME OVER! ****%N")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement