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
import UIKit | |
func calculateNet(correct:Int = 0 , wrong:Int = 0 , count:Int = 0) -> (Float) { | |
var result : Float = 0 | |
if (correct <= count && correct >= 0) && (wrong <= count && wrong >= 0) { | |
if (correct + wrong <= count){ | |
result = Float(correct) - Float(wrong)/4 |
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
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.os.Looper; | |
import rx.Observable; | |
import rx.Scheduler; |