From: Michael Fellinger Date: 2005-12-11T02:40:47+09:00 Subject: Re: Logic... --nextPart2406237.PquL2S5S0o Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok, i made a bit more cleaned up version, but i'm still not sure what you w= ant=20 to do with your method. especially, what does this .to_i mean? However, for everything you write twice or more often, ruby usually has a w= ay=20 to make it at the same time cleaner and easier to write. def make_board puts "Push enter, then begin input." puts "(For Input Format Compilance, extra enter key is necessary)" gets board =3D Array.new(9){[]} board.size.times do |i| instr =3D gets board[i] =3D instr.split(//).map{|c| c.to_i} puts board[i] end return board end Am Samstag, 10. Dezember 2005 18:25 schrieb StarLion: > def MakeBoard > rcount =3D 0 > puts "Push enter, then begin input. (For Input Format Compliance, extra > enter key is necessary)" > gets > board =3D [[],[],[],[],[],[],[],[],[]] > 9.times do > instr =3D gets > board[rcount] =3D > [instr[0].to_i,instr[1].to_i,instr[2].to_i,instr[3].to_i,instr[4].to_i,in= st >r[5].to_i,instr[6].to_i,instr[7].to_i,instr[8].to_i] rcount +=3D 1 > puts board[rcount] > end #do > return board > end #MakeBoard > > Is my logic flawed here? the puts doesnt actually output anything. --nextPart2406237.PquL2S5S0o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDmxMSMdQeL6eBxhIRAsPxAKDd4Nq6TLXdiLYFsCIMQ/JRZ07tjQCfdjuw XCuSMweM6nq8V9jnSoX/4hU= =cQkd -----END PGP SIGNATURE----- --nextPart2406237.PquL2S5S0o--