Last active
August 29, 2015 14:05
-
-
Save phadej/bf59c8c06faff5b07bcf to your computer and use it in GitHub Desktop.
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
module Supercell.LookingForServerEngineers where | |
import Supercell.Engineer as E | |
import Supercell.Job as J | |
import Control.Monad | |
import Data.Bits | |
identifier :: Int | |
identifier = 8192 | |
shiftPos :: Int | |
shiftPos = 2 | |
toJoinOurServicesTeam :: Engineer -> Job -> IO () | |
toJoinOurServicesTeam engineer job = | |
when (E.isInterested engineer && J.location job == "Helsinki") $ do | |
E.checkOut engineer $ "http://supr.cl/" ++ show (identifier `shift` shiftPos) | |
E.apply engineer job |
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
package supercell | |
package object lookingForServerEngineers { | |
val ID: Int = 8192 | |
val SHIFT_POSITIONS: Int = 8192 | |
def toJoinOurServicesTeam(engineer: Engineer, job: Job) = | |
if (engineer.isInterested && job.location == "Helsinki") { | |
engineer.checkOut("http://supr.cl/" + (ID << SHIFT_POSITIONS)) | |
engineer.apply(job) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment