Permalink
Browse files

removing two return in a method

  • Loading branch information...
1 parent 3f8d331 commit 620ffb0d11cdded317a487dd6c427c4be5deb1c7 @outofjungle committed Mar 13, 2013
Showing with 2 additions and 5 deletions.
  1. +2 −5 game.pl
View
@@ -19,11 +19,8 @@ sub draw {
sub flip {
my $side = shift;
- if ( $side % 2 == 0 ) {
- return $side - 1;
- } else {
- return $side + 1;
- }
+ my $shift = ( $side % 2 == 0 ) ? -1 : 1;
+ return $side + $shift;
}
my $count = {};

0 comments on commit 620ffb0

Please sign in to comment.