Last active
August 29, 2015 14:05
-
-
Save flexseth/b23f1d1d686d1b6effe0 to your computer and use it in GitHub Desktop.
Logic for figuring out what gun we're looking at
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
// figure out which model this is | |
$model = $rifle->get_title(); | |
$is_birthday = preg_match("/50/", $model) == 1 || preg_match("/60/", $model) == 1; | |
$is_occasion_big_boy = preg_match('/occasion/', $model) == 1 && preg_match('/big/', $model) == 1; | |
$is_occasion_golden_boy = preg_match('/occasion/', $model) == 1 && preg_match('/golden/', $model) == 1; | |
$is_personal_serial = preg_match('/serial/', $model) == 1; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment