bug fixes on tic tac toe, inheritance modeling, mastermind
This commit is contained in:
11
mastermind/Board.rb
Normal file
11
mastermind/Board.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
require_relative "../common/BoardBase.rb"
|
||||
|
||||
class Board < BoardBase
|
||||
def initialize(turn = 1)
|
||||
super(turn)
|
||||
end
|
||||
|
||||
def to_s
|
||||
print "wew"
|
||||
end
|
||||
end
|
||||
0
mastermind/CodeSet.rb
Normal file
0
mastermind/CodeSet.rb
Normal file
16
mastermind/Game.rb
Normal file
16
mastermind/Game.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require_relative "../common/GameBase.rb"
|
||||
|
||||
class Game < GameBase
|
||||
def initialize
|
||||
puts "Welcome to Mastermind!"
|
||||
puts "Player 1, what is your name?"
|
||||
player_one_name = gets.chomp
|
||||
|
||||
puts "Player 2, what is your name?"
|
||||
player_two_name = gets.chomp
|
||||
|
||||
@playerOne = Player.new(player_one_name)
|
||||
@playerTwo = Player.new(player_two_name)
|
||||
@statusMessage = ""
|
||||
end
|
||||
end
|
||||
0
mastermind/KeySet.rb
Normal file
0
mastermind/KeySet.rb
Normal file
0
mastermind/main.rb
Normal file
0
mastermind/main.rb
Normal file
Reference in New Issue
Block a user