Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note
- description: "GAME2016GULMAN_RETURN application root class"
- date: "$Date$"
- revision: "$Revision$"
- class
- APPLICATION
- inherit
- ARGUMENTS
- create
- make
- feature{NONE} -- READING`N`CHECKING_INPUT
- size_reading
- do
- io.put_string ("Input a number of columns")
- io.read_integer
- columns := io.last_integer
- if(columns > 50) --unexpectable
- then
- io.put_string ("Your number of columns is too big")
- size_reading
- else
- io.put_string ("Input a numer of rows")
- io.read_integer
- rows := io.last_integer
- if(rows > 30) then
- io.put_string ("Your number of rows is too big")
- size_reading
- end
- end
- end
- reading(in_str:INTEGER is_filled: BOOLEAN):INTEGER
- do
- if(in_str > 0 and columns - in_str > 0) then
- Result := in_str
- end
- end
- rows: INTEGER
- columns: INTEGER
- inpt: INTEGER
- i: INTEGER
- player: INTEGER
- m: ARRAY2[INTEGER]
- feature {NONE} -- Initialization
- make
- -- Run application.
- do
- size_reading
- from
- until
- false
- loop
- io.read_integer
- inpt := reading(io.last_integer, false)
- m[inpt, columns] := player
- io.put_integer_64 (inpt)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement