This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby warrior level 3 | |
# | |
class Player | |
def play_turn(warrior) | |
if @needCure == nil | |
if warrior.health < 18 | |
warrior.walk! :backward | |
@needCure = true | |
else | |
if warrior.feel.empty? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Advertencia: este código está horrible, los métodos no me funcionan, pero sirve para pasar | |
# ruby warrior level 4 | |
# | |
class Player | |
def play_turn(warrior) | |
@health = warrior.health | |
if @needCure == nil | |
if @health < 18 | |
if @health < 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby warrior level 5 | |
# | |
class Player | |
def play_turn(warrior) | |
@health = warrior.health | |
if @need_health == nil | |
if warrior.feel.empty? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby warrior level 6 | |
# | |
class Player | |
def play_turn(warrior) | |
@health = warrior.health | |
if @rescued == nil | |
if @ret == nil | |
@ret = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby warrior level 7 | |
# | |
class Player | |
def play_turn(warrior) | |
@health = warrior.health | |
if @need_health == nil | |
if warrior.feel.wall? | |
warrior.pivot! :backward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby warrior level 8 | |
# | |
class Player | |
def play_turn(warrior) | |
@health = warrior.health | |
if warrior.feel.captive? | |
warrior.rescue! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Okay, the previous version was a bit terse, but the answer you're looking for is to add the line below into your ~/.vimrc file. It tells vim that you want to setup a command to run when vim starts, but since it depends on various plugins to be loaded, you don't want to run it until all initialization is finished. The line below does this. | |
autocmd VimEnter * NERDTree | |
If, however, you're annoyed by the fact that the cursor always starts in the NERDTree window, you can add a second autocommand that will move the cursor into the main window, like so: | |
autocmd VimEnter * NERDTree | |
autocmd VimEnter * wincmd p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorscheme railscasts | |
:au FocusLost * :set number | |
:au FocusGained * :set relativenumber | |
autocmd InsertEnter * :set number | |
autocmd InsertLeave * :set relativenumber | |
autocmd VimEnter * NERDTree | |
autocmd VimEnter * wincmd p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Autologin en #Waldorf #! | |
sudo apt-get install slimconf | |
gksudo slimconf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Packages for Crunchbang | |
cb-welcome | |
# Install Vim | |
sudo apt-get install vim | |
# The better vim plugins and resources for Vim, Gvim and MacVim |
OlderNewer