Skip to content

Instantly share code, notes, and snippets.

@phadej
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phadej/bf59c8c06faff5b07bcf to your computer and use it in GitHub Desktop.
Save phadej/bf59c8c06faff5b07bcf to your computer and use it in GitHub Desktop.
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
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