Module: NewPlayer

Defined in:
lib/lotrd/v-newplayer.rb

Class Method Summary collapse

Class Method Details

.jobOptionsObject



30
31
32
33
34
35
36
37
38
39
# File 'lib/lotrd/v-newplayer.rb', line 30

def jobOptions
    system 'clear'
    puts 'What job would you like to play? (Select 1-4)'
    puts '1. Mage'
    puts '2. Knight'
    puts '3. Rogue'
    puts '4. Ranger'
    jobinput = gets.chomp.to_i
    ::PlayerGen.job(jobinput)
end

.playerNameObject



13
14
15
16
17
18
# File 'lib/lotrd/v-newplayer.rb', line 13

def playerName
    system 'clear'
    puts "What is the name of your character?"
    name = gets.chomp
    ::PlayerGen.playerName(name)
end

.raceOptionsObject



20
21
22
23
24
25
26
27
28
# File 'lib/lotrd/v-newplayer.rb', line 20

def raceOptions
    system 'clear'
    puts 'What race would you like to play? (Select 1-3)'
    puts '1. Elf'
    puts '2. Human'
    puts '3. Dwarf'
    raceinput = gets.chomp.to_i  
    ::PlayerGen.race(raceinput) 
end

.startObject



6
7
8
9
10
11
# File 'lib/lotrd/v-newplayer.rb', line 6

def start
    playerName
    raceOptions
    jobOptions
    ::Town.menu
end