From: Schneider on 12 Apr 2010 16:22 On Apr 9, 2:20 pm, Aldric Giacomoni <ald...(a)trevoke.net> wrote: > I think this project doesn't get enough attention :-)http://github.com/ryanb/ruby-warrior > > I've tried it and it's really cool and entertaining. The code is also > pretty cool to look at, and it's got tests and everything. > What is your opinion of it? How far can you go before you have to > actually think? :) > -- > Posted viahttp://www.ruby-forum.com/. AMAZING idea :)
From: Thiago Massa on 12 Apr 2010 16:45 [Note: parts of this message were removed to make it a legal post.] Hahaha, I've been studying alot lately and once I finish my tests I'm definately trying it out, *I've* been with some idea to create a game where you program stuff in order to do something but in a way that goes mainstream(and maybe be a good way to learn how to program). 2010/4/9 Aldric Giacomoni <aldric(a)trevoke.net> > I think this project doesn't get enough attention :-) > http://github.com/ryanb/ruby-warrior > > I've tried it and it's really cool and entertaining. The code is also > pretty cool to look at, and it's got tests and everything. > What is your opinion of it? How far can you go before you have to > actually think? :) > -- > Posted via http://www.ruby-forum.com/. > > -- Thiago Fernandes Massa 11 83979414
From: akraynov on 15 Apr 2010 15:59 Hello guys! I consider RubyWarrior may be useful for learning. A have reached for 6'th level (as beginner). Now my code looks as following: http://good.net/_5pJ5Rurvz . I can't understand issue: if i call in method: def roam_to_combat! debug("Entering roam_to_combat") state = :ws_combat @ini_health = health debug(@ini_health) warrior.attack!(cur_dir) end then it lacks to execute string "state = :ws_combat". But if i call def roam_to_combat! debug("Entering roam_to_combat") self.state = :ws_combat # <-- here is difference @ini_health = health debug(@ini_health) warrior.attack!(cur_dir) end then it executes "state = :ws_combat" normally. Why it didn't execute "state =" without "self"? Is it Ruby's bug? I got Ruby 1.8 installed.
From: Aldric Giacomoni on 16 Apr 2010 08:30 akraynov wrote: > It seems local variable "state" has overriden my method "state". > This can be a source of many hidden bugs for those who well-skilled in > Delphi or C++. > Why Ruby doesn't give me any warning? Because it doesn't parse incorrectly; it just runs incorrectly. That's why you need to do what Jesus explained. The burden of intelligence is on the developer ;-) -- Posted via http://www.ruby-forum.com/.
First
|
Prev
|
Pages: 1 2 3 4 Prev: Camping 2.0 - minature rails for stay-at-home moms Next: Initial release of lightning |