Last active
August 29, 2015 14:07
-
-
Save garrow/cd4c90a046911a3d965d to your computer and use it in GitHub Desktop.
WiiThree
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
# A new game console has been released, the WiiThree | |
# We need to add support for this new console to this code. | |
# | |
# It will require console specific code for each type of console. | |
# Add this feature to the code below. | |
class GameRenderer | |
def initialize(console) | |
@console = console | |
end | |
def render_widgets | |
# Code for widgets | |
if @console == "xbone" | |
# XBox Code for widgets | |
elsif @console == "ps4" | |
# Playstation Code for widgets | |
end | |
# More code for widgets | |
end | |
def render_spudgets | |
# Code for spudgets | |
if @console == "xbone" | |
# XBox Code for spudgets | |
elsif @console == "ps4" | |
# Playstation Code for spudgets | |
end | |
# More code for spudgets | |
end | |
def render_woogits | |
# Code for woogits | |
if @console == "xbone" | |
# XBox Code for woogits | |
elsif @console == "ps4" | |
# Playstation Code for woogits | |
end | |
# More code for woogits | |
end | |
def render_foobits | |
# Code for foobits | |
if @console == "xbone" | |
# XBox Code for foobits | |
elsif @console == "ps4" | |
# Playstation Code for foobits | |
end | |
# More code for foobits | |
end | |
def render_barfits | |
# Code for barfits | |
if @console == "xbone" | |
# XBox Code for barfits | |
elsif @console == "ps4" | |
# Playstation Code for barfits | |
end | |
# More code for barfits | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment