Skip to content

Instantly share code, notes, and snippets.

@kaseybon
kaseybon / greed.rb
Last active August 29, 2015 14:14 — forked from cromwellryan/greed.rb
# My approach for the greed game was to take the values in a roll and sort them into seperate arrays. For example all the ones would be in an array, twos in an array, etc.. To keep these neat and tidy I will organize them into a hash.
# I could create a class called dice with two methods, roll and score:
#The roll method will randomly generate the numbers for the roll (I don't think this project included that but I'll add it anyways) and them store them into their arrays of similar numbers.
# The score method would be responsible for taking the sorted arrays and calculating the score then return the score.
class Dice
def initialize
@roll = {1 => [], 2 => [], 3 => [], 4 => [], 5 => [], 6 => []}
@points = 0
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
<?php }
else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>"><?php _e('Login / Register','woothemes'); ?></a>
<?php } ?>